Base64 Encoder and Decoder
Base64 both ways, text or file.
FREE · NO SIGN-UP · RUNS ON YOUR DEVICE
Your file never leaves the device
- 2DIRECTIONS
- 2ALPHABETS
- 0SIGN-UP
- 1TAP TO COPY
Base64 Encoder and Decoder at a glance
- Directions
- Both directions
- Text handling
- UTF-8 correct
- Files
- Files stay local
- Alphabets
- Standard or URL-safe
- Images
- Image preview
- Bad input
- Says what is wrong
- Price
- Free
- Account required
- None
- Where it runs
- On your device
How to use Base64 Encoder and Decoder
- 1
Choose a direction
Choose a direction.
- 2
Add your text or file
Add text or a file.
- 3
Copy the result
Copy the result.
Frequently asked questions
Does it handle Chinese and accented characters?
Yes. Text is encoded as UTF-8 bytes, so a round trip returns exactly what you started with, including emoji.
What is the URL-safe alphabet?
It replaces plus and slash with minus and underscore and drops the padding, so the result can sit in a URL without escaping.
Is my file uploaded?
No. The file is read inside this tab and never leaves the device. Nothing is sent anywhere.
Is Base64 a form of encryption?
No. It is an encoding, and anyone can reverse it. It makes bytes safe to carry as text, not private.
Bytes, not characters
Text is handled as UTF-8, so Chinese, accents and emoji survive a round trip exactly. Choose a file instead of text, or switch to the URL-safe alphabet.
- Base64 encodes bytes, so text must first be turned into bytes with a known encoding.
- Encoding characters directly instead of UTF-8 bytes is what breaks Chinese and accented text.
- Base64 makes data about a third larger, which is why it suits small files rather than large ones.
- The equals signs at the end are padding, and the URL-safe form usually leaves them off.
Full specification
| Directions | Encode and decode, chosen with one switch. |
|---|---|
| Text handling | UTF-8 throughout, so Chinese, accents and emoji survive a round trip. |
| Files | Any file can be encoded. It is read in the tab and never uploaded. |
| Alphabets | Standard with plus and slash, or URL-safe with minus and underscore. |
| Images | Base64 that decodes to an image is previewed and can be downloaded. |
| Bad input | Says the Base64 is not valid rather than showing an error trace. |
| Price | Free. Supported by clearly labelled ads placed outside the working area. |
| Account required | No. |
| Where it runs | In your browser tab. Nothing is sent anywhere. |
Keep going with the same files
All developer tools: Developer tools on SPOTTOOLS