Base64 Encode and Decode

Base64 encode or decode text (UTF-8 safe), files and URL-safe Base64.

How to use Base64 Encode and Decode

  1. Choose Encode or Decode.
  2. Type or paste your text (or choose a file to Base64 encode). The result appears instantly.
  3. Copy the output. Use Swap to send the result back to the input.

About this tool

Base64 turns any data into plain letters, digits, + and /, so it can travel safely in emails, JSON, URLs, HTTP headers and data URIs. Type or paste text to Base64 encode it instantly; switch to Decode to turn Base64 back into readable text. Unlike many simple converters, this one handles UTF-8 correctly, so accented letters, non-Latin scripts and emoji survive the round trip.

Tick URL-safe to use - and _ instead of + and / without padding (the Base64URL format used in JWTs and web tokens), or split the output into 76-character lines as email (MIME) expects. You can also Base64 encode a file of up to 10 MB, and if decoded data turns out to be binary rather than text you can download it as a file. For images, the Image to Base64 tool also builds ready-to-use data URIs.

Frequently asked questions

No. Base64 is an encoding, not encryption – anyone can decode it. Never use Base64 encode to hide passwords or secrets.

Base64 uses 4 characters for every 3 bytes, so encoded data is about 33% bigger, plus line breaks if you split it.

Base64URL replaces + with - and / with _ and drops the = padding, so the result can be used in URLs and file names. JSON Web Tokens use it. Decoding accepts both forms automatically.

The Base64 probably holds binary data such as an image or a compressed file rather than text. The tool detects this and offers the data as a file download instead.