Skip to content

Base64 Encoder / Decoder

Encode and decode text to and from standard or URL-safe Base64.

Private Instant No sign-up No daily limit

Free to use. No account, no daily limit, and no watermark on the result.

 Base64 encoder / decoder

Encode options
Decode options
Input size
0 B
Output size
0 B
Ratio
—
Mode
Encode

Input

Output

 Variants & details

How to encode and decode Base64 online

1

Choose a direction

Switch between the Encode and Decode tabs. Encode turns text into Base64, decode turns Base64 back into readable text.

2

Paste your content

Type plain text to encode it, or paste a Base64 string — including URL-safe variants with - and _ characters — to decode it.

3

Pick the output style

Add a data URI prefix, build a ready-made CSS background rule, or copy the URL-safe variant for links and query strings.

4

Copy the result

Every panel has its own Copy button, and the size readout shows exactly how many bytes the input and output take.

Base64 encoder / decoder — frequently asked questions

Base64 is a binary-to-text encoding that turns arbitrary bytes into 64 safe ASCII characters (A–Z, a–z, 0–9, + and /). It was designed so binary data could travel safely through systems that only handle text, such as email headers, JSON payloads and URLs.

No. Base64 is an encoding, not encryption — anyone can decode it instantly. Never use it to hide passwords or secrets; use real encryption for that.

Standard Base64 uses + and / and pads the end with =. URL-safe Base64 (RFC 4648 §5) replaces those characters with - and _ and drops the padding, so the result can be placed directly in a URL without escaping.

That usually means the Base64 string was truncated, was actually hexadecimal or binary data rather than text, or the original bytes were not valid UTF-8. This decoder reads the bytes as UTF-8 and reports how many bytes were decoded, so you can tell a decoding problem from a text problem.

Turn on “Output as a CSS background” and pick the matching MIME type. The tool then emits a complete background-image: url("data:image/png;base64,…") declaration that you can paste straight into your stylesheet.

Related Developer Tools