Nifty Dev Tools
  1. Home
  2. Base64
Encode / Decode

Base64 Encoder & Decoder

We never upload what you paste ✨

Turn text into Base64 or Base64 back into text. It converts as you type. No buttons needed!

Text to encode
Base64

Your Base64 will appear here as you type.

What is Base64?

Base64 writes any data using only 64 safe characters (A–Z, a–z, 0–9, +, /). It's used to put binary data or special characters into places that only accept plain text: JSON, URLs, email, data URIs and HTTP headers.

Base64 is not encryption. Anyone can decode it, so never use it to hide secrets.

How to use it

  1. Pick Encode (text → Base64) or Decode (Base64 → text).
  2. Type or paste into the input. The result updates as you type.
  3. Use Swap to send the result back into the input and flip the mode.

Standard vs URL-safe Base64

VariantUsesPaddingWhere you'll see it
Standard+ and /= at the endEmail, data URIs, most APIs
URL-safe- and _Usually noneURLs, file names, JWTs

Decoding accepts both variants, with or without padding, and ignores line breaks.

Example

Hello, Nifty Dev Tools! 👋
SGVsbG8sIE5pZnR5IERldiBUb29scyEg8J+Riw==

Text is encoded as UTF-8 first, so emoji and accented letters work.

Common errors

  • “#” at position 11 isn't a Base64 character: something that isn't Base64 got pasted in, often a stray quote or a percent sign from a URL. The character is underlined in the input.
  • This looks cut off: Base64 comes in groups of 4 characters; a length like 5 or 9 means a character is missing.
  • The “=” doesn't fit here: padding only goes at the very end, and there are never more than two.

FAQ

Why does the decoded result show hex?

Some Base64 holds binary data (like an image or a key) rather than text. When the bytes aren't valid UTF-8 text, we show them as hex so nothing gets garbled.

Why is my Base64 longer than the text?

Base64 turns every 3 bytes into 4 characters, so it's about a third longer. Emoji and accented letters take several bytes in UTF-8, so they grow more.

Is my data uploaded?

No. Encoding and decoding happen in your browser. See the privacy page.