Base64 Encoder & Decoder
Encode and decode Base64 strings instantly. Client-side, private, no limits.
More Base64 Tools
File to Base64
Drop any file and get its Base64 string instantly.
Image to Base64
Convert images to Base64 for embedding in HTML and CSS.
JWT Decoder
Decode and inspect JWT tokens — header, payload, and signature.
URL Encode/Decode
Encode and decode URL components with percent-encoding.
HTML Entity Encode/Decode
Encode special characters to HTML entities and back.
Hex ↔ Base64 Converter
Convert between hexadecimal and Base64 representations.
Base64 to Image
Decode Base64 back into a viewable, downloadable image.
Base64 to File
Decode a Base64 string back into any file type.
Base64 to PDF
Convert a Base64 string into a rendered, downloadable PDF.
What is Base64?
Base64 is a binary-to-text encoding scheme that represents binary data using a set of 64 printable ASCII characters
(A–Z,
a–z,
0–9,
+, and
/).
The name comes from the fact that 64 characters can each be represented by exactly 6 bits.
Base64 was introduced to solve a practical problem: many text-based protocols (like email or HTTP headers) could not safely transmit arbitrary binary data. By converting bytes into a subset of printable ASCII, Base64 ensures the data survives transport through any text-safe channel.
Important: Base64 is an encoding, not encryption. Anyone who sees Base64-encoded data can decode it instantly. Never use Base64 as a security measure.
How Base64 Encoding Works
Encoding the word Hello (first 3 bytes: Hel)
Every 3 bytes of input produce 4 Base64 characters — a ~33% size increase.
Common Use Cases
Email & MIME
MIME encodes email attachments (images, PDFs, binary files) in Base64 so they can travel safely through text-only email servers.
Data URIs
Embed images, fonts, or other assets directly in HTML or CSS using data:image/png;base64,…, eliminating extra HTTP requests.
API Authentication
HTTP Basic Auth encodes username:password in Base64. JWT tokens use Base64URL for their header and payload sections.
Binary Transport
Send binary data (images, PDFs, keys) through JSON APIs or XML documents that only support text characters.
Config Files
Store TLS certificates, private keys, and secrets in YAML or JSON config files (e.g., Kubernetes secrets) as Base64 strings.
Clipboard & Copy/Paste
Share binary data as text — paste a Base64 string into a chat message, issue tracker, or terminal without corrupting binary content.