Base64 encode

Text to Base64 · URL-safe · UTF-8 · Emoji-safe · Data URIs

Turn text into Base64, with URL-safe output when the string has to travel in a link. UTF-8 safe, so emoji and non-Latin scripts survive the trip.

Output

0 characters · 0 words · 0 lines

Drop a text file here, or . It is read in your browser and never uploaded.

0 characters

What Base64 is for

Base64 represents arbitrary bytes using only 64 printable characters. It exists because many systems — email headers, URLs, JSON, XML, HTTP basic auth — accept text but mangle raw binary. Encoding costs about a third more space, which is the price of getting bytes through safely.

You will meet it in data URIs for inline images, in JWT tokens (each of the three segments is URL-safe Base64), in HTTP Basic authorization headers, and in email attachments.

Base64 is not security

This is worth repeating because it causes real breaches: Base64 provides no confidentiality whatsoever. A Base64 string is as readable as plain text to anyone who pastes it into a decoder. If you need to protect something, encrypt it — and if you are storing a Base64 blob because it "looks scrambled", treat it as if it were written in the clear.

Going the other way? Decode a Base64 string — or switch direction with the tabs above without losing what you pasted.

Frequently asked questions

Is this Base64 tool free?

Yes. Encode and decode as much as you like, with no account.

Is Base64 encryption?

No, and this matters. Base64 is an encoding, not encryption — anyone can decode it instantly with no key. Never use it to protect a password, token or anything else confidential. It exists to carry binary data through channels that only accept text.

Does it handle emoji and non-Latin text?

Yes. The text is converted to UTF-8 bytes before encoding, so emoji, Arabic, Chinese and accented characters all round-trip correctly. Tools that call btoa directly throw an error on any of these.

What is URL-safe Base64?

Standard Base64 uses + and / which have special meaning in URLs, and = padding which often gets stripped. URL-safe Base64 replaces + with -, / with _, and drops the padding, so the result can be dropped into a query string or path segment unchanged. This tool decodes both variants automatically.

Does Base64 make my data bigger?

Yes, by about a third: three bytes become four characters. That is the cost of getting arbitrary bytes through a channel that only accepts text, and it is why an inline data URI for a large image bloats a page more than the file size suggests.

Is my text uploaded?

No. Encoding and decoding happen in your browser, so the text never leaves your device. That is deliberate — Base64 strings often contain credentials or tokens.