Base64 Encode / Decode

INTERNET · RFC 4648 UTF-8 BASE64

Encode UTF-8 text to Base64 or decode Base64 strings locally

Calculated on this device
Enter text up to 10000 characters. Processing happens locally in your browser.

RFC 4648 STANDARD BASE64 (UTF-8)

SGVsbG8sIHdvcmxkISDimqE=
17 UTF-8 bytes · 24 output chars
Input chars15Max 10,000
UTF-8 bytes17 BMulti-byte safe
Output chars24~33% Base64 overhead

HOW IT WORKS

RFC 4648 Base64 encoding with UTF-8

Base64 converts arbitrary binary bytes into a 64-character ASCII alphabet (A–Z, a–z, 0–9, +, /) so text and payloads survive text-only protocols like email, JSON, and HTTP headers.

01

UTF-8 Byte Serialization

Unlike legacy btoa() which fails on non-Latin1 characters, this tool encodes text into UTF-8 bytes via TextEncoder first so accents and emoji round-trip losslessly.

02

6-Bit Grouping & Padding

Every 3 bytes (24 bits) map to 4 Base64 characters (6 bits each), padded with = when input length is not a multiple of 3.

03

Base64URL Mode (RFC 4648 §5)

Replaces + with - and / with _ and omits = padding for safe use in URLs and JWTs.

ENCODING GUIDE

Standard Base64 vs. Base64URL and URL encoding

When to use Base64URL instead of standard Base64

Standard Base64 uses +, /, and =, which have special meaning in URL query strings. Enabling URL-safe Base64URL avoids conflicts in query parameters and JSON Web Tokens (JWT). For percent-encoding arbitrary URL parameters, use our URL Encode / Decode tool.

Frequently asked questions

Does Base64 encrypt my data?

No. Base64 is a reversible text encoding, not encryption. Anyone can decode a Base64 string without a key.

Why does Base64 increase string length by ~33%?

Because Base64 represents 3 bytes (24 bits) using 4 ASCII characters (6 bits per character), the output is 4/3 (133%) the byte size of the input.

Why does standard JavaScript btoa() fail on emoji?

btoa() only accepts single-byte Latin1 code points. This tool encodes strings to UTF-8 bytes first so any Unicode character works cleanly.

Is my text sent to a server?

Never. All encoding and decoding runs entirely in your browser's memory.

Your inputs are processed locally in this browser and are never sent to a server or ad network.