Skip to content

Base64 Encoder & Decoder

Encode text to Base64 or decode Base64 back to text, with UTF-8 handled correctly. Runs in your browser and nothing is uploaded.

transform Base64 Encoder & Decoder
verified RFC 4648 Compliant • Real-time UTF-8 Base64 conversion
Raw: 0 B • Base64: 0 B • Encode Mode
Plain Text Input
Full UTF-8 & Unicode Character Support 62 bytes
Base64 Encoded Output
Standard RFC 4648 Base64 Alphabet 0 bytes

What this tool does

Pick Encode or Decode, paste your text, and the result appears. Encoding turns text into the 64-character alphabet of letters, digits, + and /. Decoding does the reverse.

How to use it

  1. Choose Encode to Base64 or Decode from Base64.
  2. Paste your text into the input box.
  3. Press Copy Output to take the result.

UTF-8 and special characters

The tool converts text to UTF-8 bytes first and encodes those bytes, then does the reverse when decoding. That means accented letters, non-Latin scripts and emoji survive a round trip. A plain btoa() call in a browser console fails on those characters, which is the usual reason people reach for a tool like this.

What Base64 is, and isn’t

Base64 is a way to carry bytes through systems that only handle text, such as JSON fields, email, data URIs and HTTP headers. It makes data about a third larger.

It is not encryption. Anyone can decode it, so don’t use it to hide passwords or tokens. If you see credentials stored as Base64 in a config file, treat them as plain text.

Things that trip people up

  • Padding. Standard Base64 ends with one or two = characters. Some systems drop them. If decoding fails, check for missing padding.
  • URL-safe Base64 replaces + and / with - and _. This tool decodes the standard alphabet, so convert those characters back first if you are decoding a JWT segment or similar. The JWT decoder handles that case for you.
  • Whitespace. Line breaks inside the input are ignored when decoding.
  • Text only. You paste text in and get text out. If the decoded bytes aren’t valid UTF-8, for example a decoded image, the output will look like garbage. This tool doesn’t convert files.

Is Base64 a way to secure data?

No. It is an encoding, not encryption, and anyone can reverse it.

Does it work with emoji and non-English text?

Yes. Text is converted to UTF-8 before encoding and back after decoding.

Why does decoding fail?

Usually the input is not valid Base64: missing padding, extra characters, or the URL-safe alphabet. Check for `-` and `_` characters.

Can I convert an image or file to Base64?

Not with this tool. It handles pasted text only.

Does it handle line breaks in the input?

Yes. Line breaks and other whitespace in the Base64 input are ignored when decoding.