Skip to content
DevKOM

Base64 Encoder / Decoder

Convert text to Base64 and back. Text is encoded as UTF-8 first, so accents, emoji and non-Latin scripts round-trip correctly. You can also encode a file into a Base64 string or data URL.

Mode
Base64
Base64 is an encoding, not encryption. Anyone can decode it, so never use it to protect secrets.

How to encode or decode Base64

  1. Choose Encode or Decode.
  2. Paste text (or Base64) into the input, or pick a file to encode.
  3. Turn on URL-safe mode for Base64URL used in JWTs and URLs.
  4. Copy the result, or use Swap to reverse the operation.

Frequently asked questions

Is Base64 encryption?

No. Base64 is an encoding that anyone can reverse. Never use it to hide passwords or secrets.

What is Base64URL?

A variant that uses - and _ instead of + and / and usually omits = padding, so the result is safe in URLs and file names. JWTs use it.

Why does decoding fail?

The input may contain characters outside the Base64 alphabet, have an impossible length, or decode to bytes that are not valid UTF-8 text (for example an image). The error message says which.

More in Encoding & Security.