Base64 Encode and Decode

Encode text for an HTTP header, a data URI or a config value, or decode a Base64 string to see what is inside. Emoji and accented letters survive the round trip.

  • Free
  • Runs in your browser
  • UTF-8 safe
  • No sign-up
How it works

How It Works

Convert in three steps.

01

Pick a direction

Encode turns text into Base64, Decode turns Base64 back into text.

02

Paste your input

The result appears as you type.

03

Copy the result

Switching direction moves the result to the input, so you can check a round trip.

About

What is Base64 encoding?

Base64 writes any bytes using only 64 safe characters: A-Z, a-z, 0-9, + and /. It is used wherever binary data or special characters must travel through a channel built for plain text, such as email attachments, HTTP Basic authentication headers, data URIs and JSON fields. Every 3 bytes become 4 characters, so the result is about a third larger than the input.

Base64 is an encoding, not encryption. Anyone can decode it, so never use it to hide a password or a secret.

UTF-8 first

Text is converted to UTF-8 bytes before encoding, so é, ü, 中 and emoji decode correctly anywhere.

URL-safe variant

Uses - and _ instead of + and / and drops the = padding, as JWTs and many URL parameters expect.

Forgiving decoder

Accepts line breaks, missing padding, URL-safe characters and a data: URI prefix.

Binary detection

If the decoded bytes are not text, such as an image, you can download them as a file.

Features

Why Use This Base64 Tool

Both directions, done properly.

Handles every language

Some online encoders break on non-English text. This one encodes UTF-8 correctly.

Round-trip check

Switch direction and the result becomes the input, so you can confirm it decodes back.

Decodes files too

Got a Base64 image or PDF? Decode it and download the original file.

Private

Tokens and credentials you decode stay in your browser.

✓ No Registration✓ Free✓ Browser-based✓ Text Stays Local
FAQ

Frequently Asked Questions

Questions people ask about the Base64 encoder and decoder.

The original was probably encoded from a different character set, such as Windows-1252, or the data is not text at all. If the tool detects binary data, it offers a download instead of showing it.