Skip to content

Base64 Encoder & Decoder

Convert text to Base64 and back, with emoji and accented characters handled correctly. Everything runs in your browser. Nothing you paste is uploaded or stored.

Quick answer

Base64 turns bytes into 64 safe text characters so binary data can travel in JSON, email or URLs. It is encoding, not encryption — anyone can decode it. Tokens with three dot-separated Base64 parts are JWTs; read them with the JWT decoder.

  • Free
  • No sign-up
  • Developer
  • Updated October 2026

About the Base64 Encoder & Decoder

Base64 represents any data using 64 safe characters (A–Z, a–z, 0–9, + and /). It’s used in data URIs, email attachments, HTTP Basic auth headers and JWTs. It is an encoding, not encryption — anyone can decode it.

Browsers’ built-in btoa() fails on characters outside Latin-1. This tool converts text to UTF-8 bytes first, so “café ✓” encodes and decodes correctly.

How to use it

  1. Choose Encode or Decode.
  2. Paste your text or Base64 string.
  3. For URLs and JWTs, tick URL-safe to use - and _ instead of + and /.
  4. Use Swap to round-trip and check the result.

How it works

Every 3 bytes → 4 Base64 characters

  • Output is about 33% larger than the input.
  • “=” padding fills the last group when the input length isn’t a multiple of 3.

Frequently asked questions

Is Base64 secure?

No. It hides nothing — it is trivially reversible. Use real encryption for sensitive data.

What is Base64URL?

A variant that swaps + for - and / for _ and usually drops the = padding, so the result can sit in URLs and filenames without escaping. JWTs use it.

Why does decoding give an error?

Either the input has characters outside the Base64 alphabet, or it decodes to binary data (like an image) rather than readable text.

Results are estimates for planning — check critical figures with a professional or the official source.

Popular tools