Base64 Encoder / Decoder
Encode text to Base64, decode Base64 strings back to text, or convert an image file to a Base64 data URI — all instantly in your browser. Zero data sent to any server.
What Is Base64?
Base64 is a binary-to-text encoding scheme that represents binary data using 64 printable ASCII characters: A–Z, a–z, 0–9, +, and /, with = for padding. It was designed to safely transmit binary content — like images or binary files — through systems that only support text, such as email (SMTP), JSON APIs, and HTML.
Common Use Cases
Inline Images
Embed images directly in HTML or CSS using a data:image/png;base64,… URI. Useful for small icons that shouldn't require an extra HTTP request.
API Payloads
Send binary data (images, PDFs, audio) in JSON requests without special content encoding. Many REST APIs accept Base64-encoded file attachments.
Auth Headers
HTTP Basic Authentication encodes credentials as Base64(username:password) in the Authorization header.
JWT Tokens
JSON Web Tokens use Base64URL (a URL-safe variant) to encode their header and payload segments.