Base64 Encode / Decode
Encode text or files to Base64 (and back). UTF-8 safe + URL-safe variant supported.
Utility
Base64 Encode / Decode
Generated on April 25, 2026
?What is the Base64 Encode / Decode?
Base64 encodes binary data using only 64 printable ASCII characters (A-Z, a-z, 0-9, +, /). It's the standard way to embed binary content (images, files, encryption keys) in text-only contexts: email attachments (MIME), JSON payloads, data: URLs, JWT tokens, and Basic-Auth headers. This converter is fully UTF-8 safe — non-ASCII text like Urdu, Arabic, or emoji round-trips correctly. The optional URL-safe variant (RFC 4648 §5) replaces + with - and / with _ and drops padding, which is required for URL parameters and JWT segments.
The Formula
Practical Examples
Embed a small image directly in HTML/CSS as a data: URL: `data:image/png;base64,iVBORw0KG…`.
JWT (JSON Web Token) segments are Base64URL-encoded — the URL-safe variant is critical here.
HTTP Basic-Auth: `Authorization: Basic ` + base64(username:password).
MIME email attachments use Base64 to fit binary files into 7-bit-clean SMTP transport.
Embedding small SVGs in CSS background-image properties.
Frequently Asked Questions
Popular Conversions
Jump to a ready-made conversion — useful for quick reference and sharing: