toolgix

Base64 Encode & Decode

Encode text to Base64 or decode Base64 back to text or a file, UTF-8 safe.

Runs in your browserFree · no sign-upSingle & bulk
01 Input
02 Output
OPT Options
Mode

Encode or decode every line on its own (one result per line).

How to use Base64 Encode & Decode

  1. Choose Encode or Decode.
  2. Paste your text or Base64 string.
  3. Copy the result. If decoded data is a file (an image or PDF), download it with the button that appears.

How it works

Base64 (RFC 4648) represents binary data with 64 printable characters, so it can travel through text-only channels such as JSON, email or data URLs. It is an encoding, not encryption: anyone can decode it.

Text is converted to UTF-8 bytes before encoding, so accents, non-Latin scripts and emoji round-trip correctly. The decoder accepts both the standard and URL-safe alphabets, ignores whitespace and fixes missing padding. If the decoded bytes are not valid text, the tool recognises common file types (PNG, JPEG, GIF, WebP, PDF, ZIP) and offers a download.

Example

"Hi" encodes to SGk=. Three bytes always become four characters, so Base64 output is about 33% larger than the input.

Frequently asked questions

Is Base64 secure?

No. It hides nothing; it only changes the representation. Never use it to protect passwords or secrets.

What is URL-safe Base64?

A variant that uses - and _ instead of + and / and usually drops = padding, so the result can be used in URLs and file names. JWTs use it.

Why does my decoded text show strange characters?

The data is probably binary (an image, a compressed file) or in an encoding other than UTF-8. Use the download button to save it as a file.

Can I encode a file?

For images, use Image to Base64, which also produces data URLs and CSS snippets.

Limitations

  • Text input is limited by browser memory; very large files are better handled by command-line tools.
  • Decoding assumes UTF-8 for text output.

Last reviewed November 9, 2026. How we build and test tools.

Categories

Recent and favourites

Tools you open appear here, and tools you star with “Favourite” stay at the top. This list is kept only in this browser.

Browse all 78 tools

↑ ↓ to moveEnter to openEsc to close