Base64 encode and decode

Choose Encode or Decode, paste your text or Base64 and the result appears as you type. Text is converted as UTF-8, so Korean, emoji and other languages round-trip correctly, and the URL-safe option produces Base64 you can drop into a URL or a JWT-style token.

When decoding, spaces and line breaks are ignored and the trailing = padding may be missing.

Applies when encoding. Decoding accepts both alphabets automatically.

Result

Result
SGVsbG8sIHdvcmxkIQ==
Size
13 bytes → 20 characters
Try an example:

How to use this tool

  1. Pick Encode to turn text into Base64, or Decode to turn Base64 back into text.
  2. Type or paste your input. The result updates as you type, and spaces or line breaks inside Base64 are ignored.
  3. Tick the URL-safe option when encoding for URLs, file names or JWT-style tokens. It uses - and _ and drops the = padding.
  4. Copy the result. The size line shows how many bytes went in and how many characters came out.

Good to know

  • Text is converted with UTF-8. Base64 that decodes to non-UTF-8 bytes (images, files, encrypted data) cannot be shown as text.
  • Base64 is an encoding, not encryption. Your input is processed in your browser and never uploaded.

Frequently asked questions

What is Base64 and when is it used?

Base64 turns any bytes into 64 printable characters (A–Z, a–z, 0–9, + and /) so binary data can travel through text-only channels such as JSON, e-mail, HTML data URIs and HTTP headers. It is an encoding, not encryption. Every 3 bytes become 4 characters, so the output is about 33% larger than the input.

How are Korean text and emoji encoded?

The text is first converted to UTF-8 bytes and those bytes are encoded, which matches what most programming languages and APIs produce. A Korean syllable takes 3 bytes and an emoji usually 4, so the output is longer than for ASCII. For example, 안녕하세요 is 15 bytes and becomes 7JWI64WV7ZWY7IS47JqU. Decoding reverses the steps and expects UTF-8.

What is URL-safe Base64?

Standard Base64 uses + and /, which have special meaning in URLs and file paths, and = for padding, which also needs escaping. The URL-safe variant from RFC 4648 swaps them for - and _ and usually drops the padding. JWTs and many APIs use it. Turn the option on to encode that way; decoding accepts either alphabet automatically.

Why does decoding fail or show an error?

Invalid Base64 means a character outside A–Z, a–z, 0–9, + / - _, a misplaced =, or a missing piece: a length of 4n + 1 characters can never be valid. Spaces and line breaks are ignored and missing padding is fine. If the Base64 is valid but the bytes are not UTF-8 text, as with images, files or encrypted data, the tool says so instead.

Is Base64 secure, and is my input uploaded?

Base64 is not encryption: anyone can decode it, so never use it to hide passwords or tokens. Encoding and decoding happen entirely in your browser, and your input never leaves your device or gets stored, which makes it fine for checking real API payloads. Still, avoid pasting secrets on shared computers.

Results are estimates for general information. Double-check anything important with an official source.