T

Base64

Standard Base64 with padding, for data URIs and auth headers.

Text
Loading editor…
0 B
Base64
Loading editor…
0 B

Base64 Encoder & Decoder

Encodes text as standard Base64 and decodes it back. Base64 represents arbitrary bytes using 64 safe characters, which is why it appears in data URIs, HTTP Basic authentication headers, email attachments and embedded certificates.

Input is encoded as UTF-8 before conversion, so any language and any emoji round-trips exactly. Implementations that skip that step corrupt everything outside ASCII.

How to use it

  1. Paste text on the left to encode it.
  2. Press Swap to decode an existing Base64 string.
  3. Whitespace and line breaks in pasted Base64 are ignored, so wrapped values from certificates or email headers work as-is.

Standard Base64 versus Base64URL

Standard Base64 uses + and / as its final two characters and pads the output with = so its length is a multiple of four. That is fine inside a request body but not inside a URL, where + means a space and / is a path separator.

The URL-safe variant substitutes - and _ and drops the padding. If you are working with JWTs or with values from a query string, use the Base64URL converter instead.

Frequently asked questions

Why does my decoded text look like garbage?

The most common cause is that the value is URL-safe Base64 rather than standard, so - and _ characters fail to decode. Try the Base64URL converter. The other cause is that the data is genuinely binary — an image, say — rather than text.

Does Base64 encrypt anything?

No. It is an encoding, not encryption: anyone can reverse it instantly. Never treat a Base64 string as a way of protecting a secret.

Why is the encoded output longer than the input?

Base64 represents three bytes using four characters, so output is about 33% larger, plus padding. That overhead is the price of being safe to transmit as text.

Related tools

Everything on this page runs in your browser. TurboParse is a static site with no backend, so nothing you paste is uploaded, logged or stored.

Last updated .