Base64 Encode & Decode

Convert text to Base64 and back, entirely in your browser. Supports URL-safe output, per-line encoding, and 76-character line wrapping.

{{ inCount }}

Options
{{ tip }}

{{ outCount }}

All encoding and decoding happens in your browser. Your text is never uploaded to a server.

About Base64 encoding

Base64 represents binary data using only 64 printable ASCII characters, so it can travel safely through channels built for text — email bodies, JSON payloads, HTML data URIs, or HTTP headers. Every three bytes of input become four output characters, which makes the encoded result roughly 33% larger than the original.

Base64 is an encoding, not encryption. Anyone can decode it, so never use it to protect passwords, tokens, or personal data.

Unicode is handled correctly

Many browser-based encoders call btoa() directly, which throws on any character above U+00FF — accented letters, emoji, or CJK text. This tool converts your text to UTF-8 bytes first, so héllo and 🙂 encode and round-trip exactly.

Working with images instead of text?

Use the Base64 image encoder to turn a PNG, JPEG, or SVG into a data URI you can paste straight into HTML or CSS.

What is Base64 encoding?

Base64 represents binary data using 64 printable ASCII characters, so it can travel through channels built for text — JSON payloads, HTTP headers, or email bodies. Every three bytes of input become four output characters.

Is Base64 encryption?

No. Base64 is an encoding, not encryption — anyone can decode it without a key. Never use it to protect passwords, tokens, or personal data.

Why does Base64 make my data bigger?

Four output characters represent three input bytes, so the encoded result is about 33% larger than the original, plus padding.

What is URL-safe Base64?

Standard Base64 uses + and / which have special meaning in URLs. URL-safe Base64 substitutes - and _ and usually drops the = padding, so the string can sit in a query parameter or filename unescaped.

Does this tool send my text anywhere?

No. Encoding and decoding run entirely in your browser using JavaScript. Nothing is transmitted to a server.