Base64 Encoder & Decoder

Encode text to Base64 or decode it back — instantly in your browser.

  • No upload
  • Browser-based
  • Free
  • No signup
  • Converter

Client-side converters keep your files on your device.

How to use Base64 Encoder & Decoder

  1. Choose Encode or Decode using the tabs at the top.
  2. Paste your text into the input area.
  3. The output updates instantly — no button press needed.
  4. Click Copy to grab the result, or Swap to move the output to the input for chaining conversions.

Common use cases

  • Basic HTTP authentication. HTTP Basic auth expects a base64-encoded 'user:password' string. Encode your credentials here to test API endpoints from curl or Postman.
  • Data URLs for images. Base64-encode small images to embed them directly in HTML/CSS via `data:image/png;base64,…` — no separate HTTP request.
  • JWT token inspection. JWTs are three base64url-encoded sections joined by dots. Decode the middle section to see the payload (use our JWT decoder for a friendlier view).
  • Storing binary in JSON. JSON does not natively hold binary bytes. Encoding as base64 lets you attach small files (icons, PDFs) inside JSON APIs.

Tips

  • Base64 adds ~33% overhead — a 1 MB file encodes to ~1.37 MB of text. Not efficient for large payloads.
  • There are two flavors: standard (uses +/) and URL-safe (uses -_). This tool uses standard base64. For JWTs and URL params, our JWT decoder handles URL-safe variants.
  • Base64 is NOT encryption. It hides text from a casual glance but anyone can decode it in a second. Never use it as security.
  • Whitespace and line breaks inside base64 are usually tolerated by decoders — safe to paste multi-line encoded strings.

Troubleshooting

Decoded text has garbage characters.
The source might be encoded with a different character set (Latin-1 rather than UTF-8), or you might be decoding data that isn't text at all — like a binary image.
'Invalid Base64' when the string looks correct.
Check for hidden trailing characters (newline, non-breaking space) added by copy-paste. Trim the string or retype the last character.

What to try next

Frequently asked questions

Is my text sent to a server?
No. Encoding and decoding happen entirely in your browser. Your text never leaves your device.
Does it support emoji and non-English text?
Yes. The tool encodes text as UTF-8 first, so emoji, Turkish, Arabic, Chinese and other characters are handled correctly.
Why do I get an 'invalid Base64' message?
That means the text you tried to decode is not valid Base64. Make sure you pasted the encoded string, not the original text.