If you've ever looked inside a JWT, an email attachment, or a CSS data URI, you've seen Base64. It looks like random gibberish — but it's actually a very simple and predictable encoding scheme that shows up everywhere in web development.
What Is Base64?
Base64 is a way of representing binary data (bytes) as a string of ASCII characters. It uses 64 printable characters (A–Z, a–z, 0–9, +, /) to encode any binary data — making it safe to transmit through systems that only handle text.
Example: the string Hello in Base64 is:
Important: Base64 is encoding, not encryption. Anyone can decode it — it provides no security. Never use Base64 to "hide" sensitive data.
Why Does Base64 Exist?
Many older systems and protocols (SMTP email, HTTP headers, JSON) were designed to handle only printable text. Binary data — like images, audio files, or cryptographic keys — can contain byte values that break these systems. Base64 converts binary to safe text so it can travel through text-only channels.
Where You'll See Base64 in the Wild
- JWTs — header and payload are Base64URL-encoded (a URL-safe variant)
- Email attachments — MIME standard encodes attachments as Base64
- CSS data URIs — embed images directly in CSS:
url("data:image/png;base64,...") - API payloads — binary data in JSON (images, files) sent as Base64 strings
- Basic Auth headers — HTTP Basic Auth encodes username:password in Base64
- Cryptographic keys — PEM-format keys (SSL certificates) are Base64-wrapped
Base64 vs Base64URL
Standard Base64 uses + and / which are special characters in URLs. Base64URL replaces them with - and _ — making it safe to use in URLs and JWT tokens without escaping.
How to Encode / Decode Base64 Free
- Open EazyStudio's Base64 Tool
- Paste text or upload a file to encode, or paste a Base64 string to decode
- Copy the result
Encode & Decode Base64 Free
Text, files, and images. Runs entirely in your browser — nothing is uploaded.
Open Base64 Tool