Base64 Encoder & Decoder
Encode plain text or binary data to Base64 and decode Base64 strings back to readable text instantly. Supports standard Base64, URL-safe Base64, and file encoding. Used everywhere from HTTP Basic Auth headers to embedding images inline in HTML and CSS. All conversions are performed locally in your browser.
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, +, /). It converts every 3 bytes of binary data into 4 characters, increasing size by approximately 33%.
Base64 is not encryption — it is encoding. Anyone can decode a Base64 string without a key. Its purpose is to safely transmit binary data through systems that only support text, such as email (MIME), HTTP headers, and JSON payloads.
Standard vs URL-Safe Base64
Standard Base64: Uses + and / characters. Output may use = padding. Used in email (MIME) and file transfers.
URL-safe Base64: Replaces + with - and / with _. Safe to use directly in URLs without percent-encoding. Used in JWTs and OAuth tokens.
Data URIs: Uses standard Base64 with a MIME prefix, e.g. data:image/png;base64,...
Tips & Tricks
- Encode HTTP Basic Auth as
username:password→ Base64 - JWTs use URL-safe Base64 without
=padding - Embed small images in CSS using
data:URIs - Base64 adds ~33% size overhead — not suitable for large files
- Base64 is NOT encryption — anyone can decode it
Common Base64 Use Cases
HTTP Auth
Encode username:password for HTTP Basic Authentication headers.
Data URIs
Embed small images or fonts directly in HTML/CSS without a separate file request.
API Payloads
Encode binary data for transmission in JSON API payloads.
Email (MIME)
Encode attachments and binary content in MIME email messages.