Base64 Encoder / Decoder
Encode and decode text to and from base64, with full Unicode support.
Last updated: August 2026
Base64 is an encoding, not encryption — anyone can decode it. Don't use it to protect sensitive data.
How it works
Each 3 input bytes → 4 characters from the 64-character base64 alphabet, padded with '='.
Example: 'hello world' → 'aGVsbG8gd29ybGQ='.
Frequently Asked Questions
What is base64 used for?
It encodes binary data as ASCII text for safe transport — embedding images in HTML or email, sending data in URLs, and API payloads.
Why does base64 output look like random characters?
Each 3 bytes of input becomes 4 characters from a 64-character alphabet (A–Z, a–z, 0–9, +, /), with '=' padding. The output is not encrypted, just encoded.
Is base64 the same as encryption?
No. Base64 is reversible encoding with no secret — anyone can decode it. Never use base64 to protect sensitive data.
How do I embed an image as base64 in HTML?
Use a data URI in an image tag, like img src with a data:image/png;base64 value, containing the encoded string. It saves a network request but makes the HTML larger.