Skip to main content

Base64 Encode / Decode

Convert text to and from Base64, with full UTF-8 and URL-safe support.

What non-ASCII text looks like encoded

Nine visible characters in, twenty Base64 characters out.

Input
Grüße, 世界
Output
R3LDvMOfZSwg5LiW55WM

The output is longer than you might expect because ü, ß and each CJK character take 2–3 bytes in UTF-8 first. Base64 then adds about 33% on top of the byte count, not the character count.

Base64 encoder / decoder

Base64 turns arbitrary data into 64 printable characters, commonly used to carry binary or special content where only text is allowed — email, JSON, data URIs, JWT. This online Base64 tool fully supports UTF-8, handles emoji and non-Latin text correctly, and offers a URL-safe mode.

How to use

  1. To encode: paste plain text and click Encode.
  2. To decode: paste a Base64 string and click Decode to recover the original.
  3. Tick URL-safe before encoding if the result goes into a URL or filename.

Common use cases

  • Embed a small image as a data URI in HTML/CSS.
  • Inspect the contents of a JWT.
  • Pass binary data through an API.
  • Put special characters safely into a URL parameter.

Can you hide a password with Base64?

To save an HTTP request, developers often encode a small icon or font as Base64 and drop it into CSS or HTML as a data URI, so the page never has to fetch that tiny file. The reverse is just as handy: config files, JWTs, and environment variables are full of opaque Base64 blobs, and pasting one in to decode shows you exactly what it holds. The big misconception to clear up: Base64 is not encryption, it's just encoding. There's no key and no protection — anyone with the string can reverse it in a second. So never use it to 'hide' passwords, keys, or personal data; that's plaintext in a costume. For real secrets, reach for actual encryption or hashing. Base64's only job is to carry binary data safely through a text channel.

What does this tool actually return for a given input?

Every pair below came out of this page rather than from an example: aYQ==, abYWI=, abcYWJj. Those three rows explain the = padding completely — Base64 consumes three bytes and emits four characters, so when the final group is short, the equals signs record how short. The same holds for CJK: 台北 is six UTF-8 bytes and encodes to 5Y+w5YyX, exactly eight characters with no padding needed. Check any of these against another Base64 tool.

Frequently Asked Questions

Is Base64 encryption?

No. Base64 is only an encoding — anyone can decode it back instantly, so it cannot protect secrets. Use real encryption when you need confidentiality.

Does it support non-ASCII text?

Yes. The tool uses UTF-8, so Chinese, Japanese, emoji and other characters encode and decode correctly without garbling.

What is URL-safe mode?

It replaces + with -, / with _, and drops the trailing = so the result can be placed safely in URLs or filenames.

Is my data uploaded?

No. Encoding and decoding happen locally in your browser; your input is never sent to a server.

Related reading

Is Base64 Encryption? Encoding vs. Encryption Explained →

Embed this tool

Add this tool to your own website or blog for free — just copy and paste the code below (it includes a link back to this site).