Base64 Encoder / Decoder
Encode or decode Base64 text and files. Unicode-safe.
Files
Runs entirely in your browser. Nothing you paste or upload leaves your device.
How to use the base64 encoder / decoder
- Paste text into the Text box, or choose a file under “Encode a file to Base64”.
- Press “Encode to Base64” to encode, or “Decode from Base64” to decode.
- Use “Copy result” or “Download result” to save the output.
Base64 encoder / decoder example
"Hello, World!" encodes to SGVsbG8sIFdvcmxkIQ==. The == at the end is padding, because the input length is not a multiple of 3 bytes.
Where Base64 is used
- Email attachments (MIME) and data: URLs for small images.
- Basic HTTP authentication headers.
- Embedding binary data in JSON or XML.
Tips for using the base64 encoder / decoder
- Encoded output is about 33% larger than the input.
- URL-safe Base64 uses - and _ instead of + and /.
Base64 encoder / decoder: common questions
- Is Base64 encryption?
- No. Base64 only changes how data is written so it can travel as text. Anyone can decode it, so never use it to hide passwords or secrets.
- Can I encode a file?
- Yes. Choose a file and press “Encode selected file”. The file is read in your browser and never uploaded.
- What if decoding fails?
- The input must be valid Base64 text. Check for missing characters or extra spaces and line breaks.
- Is my text uploaded?
- No. Encoding and decoding happen in your browser.
- Why does my decoded text show strange characters?
- The original was probably binary (an image or file), or used a different text encoding than UTF-8.