Base64 Encoder / Decoder

Encode text to Base64 or decode Base64 back to text. Supports UTF-8 with auto-convert mode and copy buttons

What's Base64?

Base64 encoding transforms binary or special-character data into a 64-character ASCII string (A-Z, a-z, 0-9, +, /, with = padding). So 'Hello' becomes 'SGVsbG8='. The encoding produces output 33% longer than the input but ensures the data survives transport through systems that only handle plain text - HTTP headers, email bodies, URLs, JSON values.

Common uses: embedding images in CSS/HTML (data:image/png;base64,...), encoding binary in JSON/XML, HTTP Basic Auth headers, JWT tokens (header and payload sections are base64-url-encoded). Not encryption - it's encoding. Anyone who sees base64 can decode it instantly. Use cryptography for actual security.

Common Base64 Examples

Plain TextBase64
AQQ==
ABQUI=
HelloSGVsbG8=
Hello, World!SGVsbG8sIFdvcmxkIQ==
user:passworddXNlcjpwYXNzd29yZA==
JSON {"a":1}anNvbiB7ImEiOjF9
1 byte (0xFF)/w==

Frequently Asked Questions

Why does it have padding (= signs)?

Base64 works in groups of 3 input bytes β†’ 4 output characters. When the input isn't a multiple of 3 bytes, padding fills the gap. 1 byte input = 2 output + '=='. 2 bytes input = 3 output + '='. 3 bytes = 4 output, no padding needed.

Is base64 secure?

No - it's encoding, not encryption. Anyone with the base64 string can decode it instantly to original. For actual security, use real cryptography (AES, RSA). Base64 is only useful for data transport across systems that don't handle binary.

More tools β†’