6 min read
Base64 Encoding Explained
Learn how Base64 represents bytes as text, when it is useful, and why it is not encryption.
What Base64 does
Base64 maps binary data into a restricted text alphabet. Three input bytes become four output characters, so the result is usually about one third larger.
Common uses
It is useful where a text-only channel must carry bytes: email attachments, compact data URLs, and encoded protocol fields. It provides no confidentiality because decoding needs no key.
Decode Base64 text that contains JSON
If you have a Base64 string and expect it to contain JSON, first decode it with the Base64 Decoder. Then paste the readable result into the JSON Formatter to check whether it is valid JSON. For example, eyJvayI6dHJ1ZX0= decodes to {"ok":true}, which the formatter can parse. A decoded value such as hello is ordinary text, not JSON, and the formatter will report a syntax error.
This is a two-step text workflow, not a dedicated Base64-to-JSON conversion or a way to decrypt encrypted data. Base64 only encodes bytes; encrypted content still needs the correct algorithm and key. The decoder reads decoded bytes as UTF-8 text, including Unicode when the original bytes use UTF-8.
Base64: eyJvayI6dHJ1ZX0=
Decoded text: {"ok":true}
JSON Formatter output:
{
"ok": true
}