Base64 Encode/Decode

Encode text to Base64 or decode Base64 strings back to text.

Need to encode something to Base64 or decode a Base64 string? Paste your text above, pick encode or decode and get the result instantly. This tool runs entirely in your browser, so nothing gets sent to a server.

What Is Base64 Encoding?

Base64 converts binary data into a set of 64 printable ASCII characters (A-Z, a-z, 0-9, + and /). It was designed to let you send binary data through systems that only handle text. Email attachments, for instance, get Base64-encoded before they're sent through SMTP. The tradeoff is size. Base64 encoding increases data by about 33%. Three bytes of input become four Base64 characters.

Where You'll See Base64 in the Wild

  • Data URIs - Embedding small images directly in HTML or CSS (like "data:image/png;base64,iVBOR...")
  • Email - MIME encoding for attachments
  • JWTs - JSON Web Tokens used in authentication are Base64url-encoded
  • API payloads - Storing binary data inside JSON since JSON can't handle raw bytes
  • HTTP Basic Auth - Username and password pairs are Base64-encoded (but not encrypted!)

Base64 Is NOT Encryption

This trips up a lot of people. Base64 is encoding, not encryption. Anyone can decode a Base64 string in seconds. Don't use it to hide passwords, API keys or sensitive data. If you need actual security, use proper encryption like AES-256. Base64 just makes binary data safe for text-based transport.

URL-Safe Base64

Standard Base64 uses + and / characters, which have special meaning in URLs. URL-safe Base64 swaps those for - and _ instead. If you're passing Base64 data in a URL query string, you need the URL-safe variant or things will break. JWTs use URL-safe Base64 for this exact reason.

How to Use

  1. Paste your plain text or Base64 string into the input area.
  2. Click Encode to convert text to Base64.
  3. Click Decode to convert Base64 back to readable text.
  4. Copy the result and use it wherever you need.

Frequently Asked Questions

How do I use Base64 Encode and Decode?

Choose encode or decode, paste the text and copy the result. Use encode to turn text into Base64. Use decode to read Base64 back into text when the original data is text.

Is Base64 encryption?

No. Base64 is encoding, not security. Anyone can decode it if they have the string. Do not use Base64 to hide passwords, tokens or private files.

Why does decoded Base64 look like random symbols?

The original data may not be text. Base64 often stores images, compressed files, binary data or encrypted content. In that case, decoding it as text will look strange.

Can Base64 handle Unicode text?

Yes when the text is encoded with the right character set, usually UTF-8. Wrong encoding can produce broken characters. If names or symbols look wrong, check the source encoding.

Why is Base64 output longer than the original?

Base64 expands data because it turns bytes into printable text. A file usually becomes about one third larger. That is normal and not a sign of an error.