English

Base64 Encoder and Decoder

A Base64 encoder and decoder that gets Unicode right

Runs in your browser · nothing is uploaded

Output

What is Base64?

Base64 represents bytes using 64 characters: upper- and lowercase letters, digits, + and /. It is used to carry binary data through text-only channels such as email attachments, data URLs and JWT tokens. Every 3 bytes become 4 characters, so output is about 33% longer than the input.

How to use

  1. Choose Encode or Decode.
  2. Paste text or a Base64 string into the input box; the result appears instantly, with the text size in bytes and the Base64 length in characters above it.
  3. Turn on URL-safe if you need it, then press Copy.

How it works

  • Text is converted to UTF-8 bytes before encoding. A Korean syllable takes 3 bytes and most emoji take 4.
  • When decoding, spaces and line breaks are ignored and missing = padding is added automatically. Both URL-safe (-, _) and standard (+, /) input are accepted, and a data:…;base64, prefix is dropped.
  • If the decoded bytes are not valid UTF-8 (for example an image), you get an error instead of garbled text.

Examples

Input Base64
a YQ==
안녕하세요 7JWI64WV7ZWY7IS47JqU
中文 5Lit5paH
👍 8J+RjQ==

FAQ

Why do some Base64 tools fail on Chinese or emoji?

The browser's built-in btoa() only accepts Latin-1 characters, so tools that call it directly throw an error on other scripts. This tool converts text to UTF-8 bytes first, so "中文" becomes 5Lit5paH.

What is URL-safe Base64?

It replaces + and / with - and _ and drops the trailing = padding, so the result can go straight into URLs or JWT tokens.

Is my input stored anywhere?

No. Everything runs in your browser and nothing is sent to a server.

Missing a tool?