What is Base64 used for?
Understand what Base64 is for, where it is used, and why it does not protect data.
Last updated 10 November 2026
What Base64 does
Base64 turns bytes into a set of 64 characters that are safe to put in text, such as JSON, HTML or email. The encoded text is about a third longer than the original data.
Where it is used
Developers use Base64 to embed small images in HTML or CSS, to send binary attachments inside JSON or email, and to build the parts of a JWT. The URL-safe alphabet replaces + and / with - and _ so the value can sit in a URL.
What Base64 is not
Base64 is an encoding, not encryption or compression. Anyone can decode it with no key, so never rely on it to hide a password or a secret.
Text and Base64
Text is converted to bytes with UTF-8 before it is encoded. Decoding must use the same character encoding. If accented letters or emoji come out garbled, the data was probably encoded with a different encoding.
Try it with the Base64 Encoder & Decoder
Everything runs in your browser, and nothing you enter is uploaded.
Open Base64 Encoder & Decoder