Base64 Encoder / Decoder
Encode text to Base64 or decode Base64 strings. Supports standard and URL-safe encoding.
What is Base64?
Base64 is a binary-to-text encoding scheme that represents binary data using an alphabet of 64 characters (A–Z, a–z, 0–9, +, and /). It is commonly used to encode binary data (like images or files) in contexts that only support text, such as email attachments, HTML data URIs, and HTTP headers.
Standard vs URL-safe Base64
| Type | Characters | Common Use |
|---|---|---|
| Standard (RFC 4648) | A–Z a–z 0–9 + / | Email, data URIs, general encoding |
| URL-safe (RFC 4648 §5) | A–Z a–z 0–9 - _ | URLs, JWT tokens, file names |
URL-safe Base64 replaces + with - and / with _ so the encoded string can safely appear in URLs without percent-encoding.
Frequently Asked Questions
Is Base64 encryption?
No. Base64 is an encoding, not encryption. Encoded data can be easily decoded by anyone. Do not use Base64 to protect sensitive data — use proper encryption for that.
Why does Base64 end with == or =?
Base64 pads the output to a multiple of 4 characters using the = character. This is required by the standard and helps decoders know where the data ends.
Is my data sent to a server?
No. All encoding and decoding runs directly in your browser using the built-in btoa() and atob() functions. No data ever leaves your device.