4 min read
Base64 Encoding Explained
What Base64 is for, why it is not encryption and how Unicode is handled.
Quick answer
Base64 encodes bytes as printable text. It is reversible by anyone and is not encryption.
What it is for
Base64 represents binary data using 64 printable characters. It exists so bytes can survive transport through text-only channels such as email, JSON fields or data URLs.
It is not encryption
Base64 is an encoding, not a security measure. Anyone can decode it instantly, so never use it to hide secrets.
Unicode and padding
Encode text as UTF-8 bytes first, then Base64. The = padding characters at the end make the length a multiple of four.
Common mistakes
- •Using it to hide secrets
- •Decoding non-UTF-8 bytes as text
- •Forgetting padding characters
When to use this
- •Embedding small data in URLs or HTML
- •Reading API responses
- •Transporting bytes through text-only channels
Try it yourself
Encode text to Base64 or decode Base64 back to text, with Unicode support. Runs locally in your browser.
Open Base64 Encoder / Decoder