Skip to content

Base64 encode & decode

Convert text to Base64 and back, with emoji and accents intact.

Updated

Mode

How to encode or decode Base64

  1. Choose Encode to turn text into Base64, or Decode to turn Base64 back into text.
  2. Type or paste into the input box. The result updates as you type.
  3. For values going into URLs, file names or JWTs, turn on URL-safe.
  4. Copy the result, download it, or press Swap to reverse the direction.

Standard vs URL-safe Base64

VariantCharacters 62 and 63PaddingUsed in
Standard (RFC 4648 §4)+ and /= to a multiple of 4Email attachments, data URLs, most APIs
URL-safe (RFC 4648 §5)- and _Usually omittedJWTs, URLs, file names

Base64 isn't encryption

Base64 only changes how data is written down; anyone can decode it in a second. Use it to move data safely through text-only channels, never to hide passwords, keys or personal information.

Common uses

  • Reading an encoded config value. Kubernetes secrets and some config files store values in Base64. Decode one to check what it says, or encode a new value to paste in.
  • Building a Basic auth header. HTTP Basic authentication sends username:password in Base64. Encode the pair to build an Authorization header when testing an API.
  • A value hidden in a link or token. Decode a Base64 parameter from a URL or a segment of a token to read the text inside. Standard and URL-safe input both work.

Questions

What is Base64?

Base64 represents any data using 64 safe characters (A–Z, a–z, 0–9, + and /), so it can travel through systems that only handle text, such as email, JSON and URLs. It makes data about a third larger; it isn't encryption.

What's the difference between Base64 and URL-safe Base64?

URL-safe Base64 (Base64URL) swaps + for - and / for _, and usually drops the = padding, so the result can sit in a URL or file name without escaping. JWTs use it. The decoder here accepts both.

Why does decoding say my Base64 is binary data?

The Base64 decoded correctly, but the result isn't readable text; it's probably an image, a PDF or another file. Text output only works when the original data was text.

Does it handle emoji and non-English text?

Yes. Text is encoded as UTF-8 first, so accents, emoji and every script round-trip exactly, unlike tools that call the browser's btoa directly and fail on non-Latin characters.