Skip to content
Dev

Base64 Decode and Encode

Use this base64 decode tool to turn Base64 into text, or encode text to Base64, entirely in the browser. It handles UTF-8 and emoji, the URL-safe alphabet (- and _), and missing padding, and it shows a clear error for invalid input.

Mode

UTF-8 text, including emoji. URL-safe Base64 (- and _) and missing padding are accepted. Spaces and line breaks are ignored.

Decoded text

Runs in your browser. Nothing is uploaded.

How to use

  1. Choose Decode or Encode.
  2. Paste Base64, or type the text to encode. Spaces and line breaks in Base64 are ignored.
  3. For encoding, turn on URL-safe output if you need - and _ instead of + and /, without = padding.
  4. Read the result and use Copy. Invalid Base64, and bytes that are not UTF-8 text, show an error. Nothing is uploaded.

How it works

Encoding turns the text into UTF-8 bytes, then writes those bytes with the Base64 alphabet (A–Z, a–z, 0–9, + and /) and = padding. URL-safe output swaps + and / for - and _ and drops the padding. Decoding accepts either alphabet, adds missing padding when the length is not a multiple of 4, and reads the bytes back as UTF-8.

Example. Hello encodes to SGVsbG8=. The same value without the final = still decodes to Hello. The emoji 😀 encodes to 8J+YgA==, and the URL-safe form is 8J-YgA.

Frequently asked questions

What is Base64?

A way to write binary data using 64 text characters (A-Z, a-z, 0-9, + and /), so it can travel through text-only systems.

Is Base64 encryption?

No. Anyone can decode it. Do not use it to protect secrets.

What is URL-safe Base64?

A variant that uses - and _ instead of + and / so the string can sit in a URL.

Why do some strings end with = signs?

The = is padding that makes the length a multiple of 4. This tool accepts strings with or without it.

Is my data uploaded?

No. Decoding and encoding run entirely in your browser.