Free Base64 Encoder & Decoder — Instant, Browser-Based
Encode text to Base64 or decode Base64 strings instantly. Supports Unicode. Runs in your browser — no data transmitted. ...
Our Base64 encoder and decoder converts text to Base64 format or decodes Base64 strings back to plaintext — instantly in your browser using native JavaScript. Supports full Unicode through UTF-8 encoding. No data is transmitted to any server. Ideal for encoding data in APIs, embedding images in CSS, encoding email attachments, and preparing data for URL transmission.
What Is Base64 Encoding?
Base64 is a binary-to-text encoding scheme that converts binary data into an ASCII string format using 64 printable characters (A–Z, a–z, 0–9, +, /). It is used when binary data needs to be stored or transmitted in contexts that only support text. The name "Base64" refers to the 64 characters used in the encoding alphabet.
Base64 is not encryption — it is encoding. Anyone with the Base64 string can decode it back to the original. Use it for data portability, not data security. Encoded strings are approximately 33% larger than the original input.
Common Use Cases
API & JSON Data
Transmit binary data like images or files in JSON payloads where only text is supported. The Base64 string can be included as a JSON field value.
CSS Image Embedding
Embed small images directly in CSS as data URIs: background-image: url("data:image/png;base64,..."). Reduces HTTP requests for small icons.
Email Attachments
MIME email standard uses Base64 to encode attachments for transmission through text-only email protocols. Most email clients handle this automatically.
Authentication Headers
HTTP Basic Auth encodes credentials as Base64 in the Authorization header: Authorization: Basic [base64(username:password)].
JWT Token Payloads
JSON Web Tokens use Base64URL (a variant) to encode their header, payload, and signature segments. Decode a JWT here to inspect its contents.
Binary in URLs
Pass binary data through URLs by Base64-encoding it first. Use the URL-safe variant (replace + with - and / with _) for use in query parameters.