Base64 Encoder/Decoder
Input
Standard Base64
URL-Safe Base64
MIME Base64
Base64 Reference
Character Sets & Line Breaks
Variant | Characters 62-63 | Padding | Line Breaks |
---|---|---|---|
Standard | + / | = | None |
URL-Safe | - _ | None | None |
MIME | + / | = | Every 76 chars |
Common Applications
Standard Base64: Data URIs, JSON payloads, API responses, configuration files, and general binary-to-text encoding.
URL-Safe Base64: JWT tokens, OAuth parameters, URL query strings, filename encoding, and web API identifiers.
MIME Base64: Email attachments, SMTP transmission, HTTP headers, and legacy systems with line length limits.
Specifications
- RFC 4648 - Base64 Data Encodings
- RFC 2045 - MIME Base64 Content-Transfer-Encoding
- All variants use the same 62-character alphabet:
A-Z
,a-z
,0-9
, but differ in the final two characters. - URL-Safe replaces
+
and/
with-
and_
to avoid conflicts with URL path separators and query parameters. - MIME adds line breaks at 76 characters for transport compatibility.