Base64 Encoder & Decoder

By the ToolPocket team · Updated 2026-12-05 · Editorial standards

Base64 turns binary data into plain ASCII so it can travel safely through systems that only accept text. You will meet it in data URLs, email attachments, JSON web tokens and configuration files.

This tool encodes and decodes UTF-8 text, including emoji and non-Latin alphabets, and can produce URL-safe output for use in query strings.

Runs locally in your browser — nothing is uploaded.

How to use the Base64 Encoder & Decoder

  1. Choose Encode or Decode.
  2. Type or paste your text or Base64 string.
  3. Press the action button and copy the result.

Frequently asked questions

What does URL-safe Base64 change?

Standard Base64 uses + and / characters, which have special meanings in URLs. URL-safe Base64 replaces them with - and _ and can drop the trailing = padding.

Why does my Base64 not decode?

The string is probably truncated, contains line breaks or spaces, or was encoded with a different padding. Remove any whitespace first and make sure you have the complete string.

Can it encode files?

This version handles text. For binary files, use a dedicated file-to-Base64 converter; pasting binary content as text usually corrupts it.

Good to know

Base64 is an encoding, not encryption: anyone can decode it. It exists so binary data can travel through text-only channels such as email bodies, data URLs and JSON fields.

The cost is size: Base64 is about 33% larger than the original bytes. For URLs and filenames, the URL-safe variant replaces + and / with - and _ and drops padding; this tool follows the standard alphabet, which is what MIME and data URLs expect.