Skip to content
kitify
Esc
↑ ↓ to moveEnter to open

Base64 encode and decode

Turn text, images or any file into Base64, or decode Base64 back to readable text. Emoji and accents work properly.

18 bytes in → 24 characters out (about 33% bigger)

How to use it

  1. Choose Encode or Decode.
  2. Type or paste your text. To encode an image or file, click Encode a file or image and you'll get a data: URI you can drop into HTML or CSS.
  3. Copy the result. Tick URL-safe for base64url, the version used in JWTs and URLs (- and _ instead of + and /, no padding).

What is Base64?

Base64 writes binary data using 64 safe characters (A–Z, a–z, 0–9, + and /). It lets you send images, keys or attachments through systems that only handle text, such as email, JSON and HTML. It isn't encryption: anyone can decode it. Encoded data is about a third bigger than the original.

Why other decoders show garbled text

The browser's built-in btoa() only handles Latin-1, so text with "é", "ł" or 🎉 breaks. This tool encodes to UTF-8 bytes first, which is what every modern API expects. If decoded data isn't text at all, for example a PNG, you can download it as a file instead.

Questions people ask

Is Base64 encryption?

No. It's an encoding anyone can reverse. Don't use it to hide passwords or secrets.

What's the difference between Base64 and base64url?

base64url swaps + for - and / for _, and drops the = padding, so the result is safe inside URLs and file names. JWTs use base64url.

How do I convert an image to Base64?

Choose Encode, click Encode a file or image and pick the picture. You'll get a data URI like data:image/png;base64,… ready for an img src or CSS background.

Why is my decoded text full of strange characters?

The data is probably binary, such as an image or a zip file, rather than text. The tool tells you when this happens and lets you download it.