Base64 Encoder & Decoder
Use this free Base64 encoder decoder to encode text to Base64 or decode Base64 back to text. Works with Unicode, URL-safe Base64, and files.
Your data is processed locally in your browser. We do not upload your text or files.
Base64 encoder decoder tool
Encode: text goes in, Base64 comes out.
Input
Output
Advanced options
Decode mode needs the matching variant selected. If your text contains - or _, choose URL-safe. Missing padding is added automatically.
File encoder
Turn any file into Base64, or turn Base64 back into a downloadable file. Files are read in your browser and never uploaded. Files up to 20 MB are supported.
Encode a file to Base64
- File name
- File type
- File size
- Base64 size
Decode Base64 to a file
The file type is detected from a data URL prefix or from the file's first bytes. If it can't be identified, it's saved as a generic .bin file.
Why use this Base64 encoder decoder?
SGVsbG8= in Base64.This Base64 encoder decoder is free, fast and private. It runs in your browser, so your text and files stay on your device. You can paste text, choose standard or URL-safe Base64, and get the result instantly.
Whether you work with an API, a data URL or an email attachment, the Base64 encoder decoder handles Unicode text such as Urdu, Arabic, Chinese and emoji, and it can also convert files.
Base64 guide
What is Base64?
Base64 is a way to write any data using only 64 plain characters: letters, numbers, + and /. Because those characters are safe almost everywhere, Base64 lets you move text, images, or files through systems that only handle simple text.
The cost is size: Base64 output is about one third larger than the original data.
Base64 example
The trailing = is padding. It fills the output to a multiple of four characters.
How to encode text with the Base64 encoder decoder
- Choose Encode above the input box.
- Type or paste your text into Input.
- Press Encode to Base64, or leave Auto convert on.
- Press Copy or Download to take the result.
How to decode Base64 with the Base64 encoder decoder
- Choose Decode above the input box.
- Paste your Base64 into Input. Line breaks and extra spaces are ignored.
- If it contains
-or_, open Advanced options and pick URL-safe. - Press Decode Base64 and read the original text in Output.
Is Base64 encryption?
No. Base64 is an encoding format, not encryption. Base64 does not protect data from being read.
Anyone can decode Base64 with a tool like this one, no key needed. Never use it to hide passwords, tokens, or personal data.
Standard vs URL-safe Base64
Standard Base64 uses + and /, which have special meaning in URLs. URL-safe Base64 swaps them for - and _ and often drops the = padding, so the text can be placed in a link, query string, or file name as is.
Base64 vs encryption
| Base64 (encoding) | Encryption | |
|---|---|---|
| Purpose | Represent data as safe text | Keep data secret |
| Needs a key | No | Yes |
| Who can reverse it | Anyone | Only someone with the right key |
| Protects privacy | No | Yes, when used correctly |
| Output size | About 33% larger | Depends on the algorithm |
| Typical examples | Data URLs, email attachments | AES, RSA, TLS |
Where is Base64 used?
- APIs: sending small files or binary values inside JSON.
- Web development: inlining small assets and storing binary values as text.
- Data transfer: moving binary data through text-only channels.
- Email: MIME uses Base64 to attach files to messages.
- Images: embedding a picture directly in HTML or CSS.
- JWT-related data: JSON Web Tokens write their header and payload as URL-safe Base64. That content is readable by anyone, so it is encoded, not secured.
- Data URLs: the
data:image/png;base64,...format used in web pages.
Frequently asked questions
Is Base64 encryption?
No. Base64 is an encoding format, not encryption. Base64 does not protect data from being read.
Is this Base64 encoder decoder free to use?
Yes. This Base64 encoder decoder is free, needs no sign-up, and works on phones and computers.
Does this tool upload my text or files?
No. Your data is processed locally in your browser. We do not upload your text or files.
What is URL-safe Base64?
URL-safe Base64 replaces + with - and / with _ so the result can be used in URLs and file names without extra escaping. Padding with = is often removed.
Why does decoded Base64 look like garbled characters?
The Base64 probably represents a file or binary data rather than UTF-8 text. Use the file decoder to turn it back into a downloadable file.