Base64 Encode & Decode Online
Encode and decode Base64, with URL-safe variant.
Free · no sign-up · runs locally·
About this tool
Base64 maps every 3 bytes to 4 ASCII characters so binary data can travel through text-only channels — email, JSON, data URLs, JWTs. This tool encodes and decodes live with correct UTF-8 handling, including the URL-safe alphabet (- and _ replacing + and /).
Like everything on encrypt.tools, this runs entirely in your browser — nothing you enter is transmitted or stored.
Do the same in a terminal
Reproduce or cross-check this tool with standard command-line utilities. For deterministic operations like hashing and encoding, the output matches exactly.
$ printf 'hello' | base64
aGVsbG8=
$ echo 'aGVsbG8=' | base64 -d
hello[Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes('hello'))Frequently asked questions about Base64
What is Base64 used for?+
It encodes binary data as text so it can travel through text-only channels — email attachments, JSON, data URLs, and JWTs. Every 3 bytes become 4 ASCII characters.
What is Base64URL?+
A URL-safe variant that replaces + and / with - and _ and drops padding, so the result is safe in URLs and filenames. JWTs use it.
Does it handle Unicode and emoji?+
Yes — text is encoded as UTF-8 first, so any Unicode, including emoji, round-trips correctly.
Encoding vs Encryption vs Hashing: The Difference, With Examples
Encoding, encryption and hashing all turn data into gibberish, but only one keeps secrets. Learn the difference with real Base64, AES and SHA-256 examples and when to use each.
6 MIN READJWT · WEB SECURITYHow to Decode a JWT — and 7 Security Mistakes That Get Tokens Forged
What's inside a JSON Web Token, how to decode and verify one safely, and the real-world JWT vulnerabilities — alg:none, key confusion, weak secrets — with the fix for each.
6 MIN READ