Base64 Encoder / Decoder
Convert any text to Base64 or decode Base64 back to plain text instantly — all in your browser with no data sent to a server.
What Is Base64?
Base64 is an encoding scheme that converts binary or text data into a string of 64 printable ASCII characters (A–Z, a–z, 0–9, +, /). It is widely used to safely transmit data in contexts that only support text — such as embedding images in HTML/CSS, encoding JWT payloads, and passing binary data through HTTP headers or JSON fields.
Standard vs. URL-Safe Base64
Standard Base64 uses + and / as the 62nd and 63rd characters, and pads the output with =. These characters have special meaning in URLs and HTML, which can cause issues.
URL-safe Base64 (also called Base64url) replaces + with - and / with _, and omits the = padding. This variant is used in JWTs, OAuth tokens, and many modern web APIs.
Common Use Cases
- JWT tokens — The header and payload sections of a JSON Web Token are Base64url-encoded
- Data URIs — Embedding images or fonts directly in CSS/HTML as
data:image/png;base64,... - Email attachments — MIME encoding uses Base64 for binary attachments
- API authentication — HTTP Basic Auth encodes
username:passwordin Base64 - Storing binary in JSON — JSON has no binary type, so Base64 is the standard workaround
Frequently Asked Questions
Is Base64 a form of encryption? No. Base64 is an encoding, not encryption. Anyone can decode it instantly without a key. Never use Base64 to secure sensitive data — use proper encryption instead.
Why does Base64 output end with == or =?
Base64 encodes 3 bytes at a time. If the input length is not a multiple of 3, padding characters (=) are added to make the output length a multiple of 4.
Can I encode binary files with this tool? This tool works with text input only. For binary file encoding, you would need a tool that accepts file uploads.