Base64 Encode / Decode

Encode plain text to Base64 or decode Base64 back to plain text. Auto-detects which direction. Browser-only — your text never leaves the page.

Example: Hello WorldSGVsbG8gV29ybGQ=

Base64 encodes binary data as ASCII text using a 64-character alphabet (A–Z, a–z, 0–9, +, /). It expands the input by ~33% but produces output that survives email, URLs, JSON, and any text-only transport.

This tool auto-detects direction: if the input looks like a valid Base64 string, it decodes; otherwise it encodes.

Use cases

Embedding images in CSS or HTML

data:image/png;base64,... URIs let you inline images directly in HTML or CSS. This tool encodes the bytes; paste them after the prefix.

Encoding API tokens

Basic auth ("Authorization: Basic") expects a Base64-encoded "user:pass" string. Encode your credentials before pasting into a request header.

Decoding JWT payloads

JSON Web Tokens are three Base64-encoded parts separated by dots. Decode the middle part to read the claims (header and signature work the same way).

Email attachment debugging

Email attachments are Base64-encoded inside MIME parts. Pasting raw email source into the decoder reveals the original content.

Quick binary safe transport

Need to send binary content through a JSON API? Base64-encode it; decode on the receiving end.

Frequently asked questions

Is Base64 encryption?

No. It's encoding — anyone can decode it. It's for transport, not security. To secure data, encrypt before encoding.

Why does my Base64 output have an =?

Base64 output is padded to a multiple of 4 characters. = is the padding character — one or two are added as needed.

How does the auto-detect work?

If the input is only Base64-alphabet characters and its length is a multiple of 4, the tool tries to decode. If decoding produces valid UTF-8, that wins. Otherwise it encodes.

Does it handle Unicode?

Yes. The tool encodes UTF-8 bytes for non-ASCII input. Most other Base64 tools fail on emojis or accented letters; ours handles them correctly.

Embed our tools on your website

Free for any site. No signup. Iframe loads from our servers and stays up-to-date automatically.

📋 Embed the Word Counter

Copy this snippet:

Live preview:

📋 Embed this Base64 Encode / Decode

Copy this snippet:

Live preview:

Want more options? All embeddable tools →