Base64 Encoder & Decoder — Encode & Decode Online

Encode text to Base64 or decode Base64 back to text — with URL-safe Base64 support and full Unicode handling, all in your browser.

Quick answer: Encode text to Base64 or decode Base64 back to text — with URL-safe Base64 support and full Unicode handling, all in your browser.

🔢 Base64 Encoder & Decoder

Base64 is a binary-to-text encoding that represents any data using just 64 printable ASCII characters (A–Z, a–z, 0–9, +, and /). It is everywhere in modern computing: email attachments (MIME), images embedded in web pages as data URIs, tokens and API keys in JSON payloads, and certificates in config files all use Base64 to safely move binary data through text-only channels.

This free Base64 encoder and decoder converts plain text to Base64 or decodes Base64 back to readable text in one click. It handles full Unicode correctly — including emoji and non-Latin scripts — using proper UTF-8 encoding, and it supports URL-safe Base64 (RFC 4648 §5), which swaps + and / for - and _ so encoded values can live inside URLs and filenames without percent-encoding. All conversion runs entirely in your browser, so tokens, credentials, and other sensitive strings never leave your machine.

One important caution: Base64 is not encryption. Anyone can decode a Base64 string in a second, so never treat it as a way to protect secrets or passwords — it only changes the data's format, not its visibility.

How to use the Base64 Encoder & Decoder

  1. Choose Encode or Decode at the top of the tool.
  2. Paste your text (for encoding) or your Base64 string (for decoding) into the input box.
  3. Tick URL-safe Base64 if the value will be used in a URL or filename.
  4. Click Convert, then Copy output to use the result anywhere.

Tips for accurate results

  • Decoding errors almost always mean stray whitespace, line breaks, or missing = padding — remove them and try again.
  • Use URL-safe mode for query parameters, OAuth state values, and filenames so + and / never break the URL.
  • Base64 makes data ~33% larger — normal for images in data URIs, but avoid it for large files over the network.
  • The = padding characters at the end are part of the encoding — keep them when you paste the value elsewhere.

Where Base64 shows up in everyday work

Developers meet Base64 in API tokens and JWTs, data:image/png;base64,... image embeds, email attachments, and CI/CD secrets. Non-developers encounter it in password managers' exported fields, email message sources, and configuration exports. Encoding text for a JSON payload or decoding a token's payload segment are the two most common jobs this tool handles.

Frequently asked questions

What is Base64 encoding?

Base64 is a binary-to-text encoding that represents arbitrary data using 64 ASCII characters (A–Z, a–z, 0–9, +, /). It is commonly used to embed binary data in text formats such as email bodies, JSON payloads, data URIs, and configuration files.

Is Base64 a form of encryption?

No. Base64 is an encoding, not encryption — anyone can decode it instantly. Never use Base64 to protect secrets or passwords; it only disguises data format, not content.

What is URL-safe Base64?

Standard Base64 uses + and /, which have special meaning in URLs. URL-safe Base64 (RFC 4648 §5) replaces them with - and _ so encoded values can be placed in URLs and filenames without escaping.

Is my text uploaded anywhere when I encode or decode it?

No. Encoding and decoding run entirely in your browser with JavaScript — nothing is sent to any server, so even sensitive tokens and credentials stay on your machine.