Encode text to Base64 or decode Base64 strings back to plain text instantly. Supports standard and URL-safe Base64. All processing happens in your browser — zero server contact.
Convert any text or file content to/from Base64 format
Encode file content (text files, JSON, XML) to Base64
Generate URL-safe Base64 with + replaced by - and / by _
Conversion happens in-browser with zero delay
One-click copy of encoded or decoded result
All processing is local — your data never leaves your device
Select Encode (text → Base64) or Decode (Base64 → text).
Paste your text string or Base64 string into the input box.
Hit Encode or Decode to process your input.
Copy the output with one click for immediate use.
Base64 is a binary-to-text encoding scheme that represents binary data using only 64 printable ASCII characters: A–Z (26), a–z (26), 0–9 (10), and the characters + and / (2). The equal sign = is used as padding. The name "Base64" refers to the 64 unique characters in its alphabet.
The fundamental problem Base64 solves is binary data compatibility. Many systems and protocols — email servers (SMTP), URLs, databases, XML files, and JSON payloads — were designed to handle text only. They can't process raw binary data like images, audio files, or encrypted payloads without corruption. Base64 converts that binary data into safe, printable text that any text-based system can handle without modification.
This free Base64 tool handles encoding (text → Base64) and decoding (Base64 → text) instantly, with support for URL-safe Base64, padding removal, and MIME-standard line breaks. All processing happens client-side in your browser — your data never leaves your device.
data:image/png;base64,...) to reduce HTTP requestsUses characters: A-Z a-z 0-9 + / =
The + and / characters cause problems in URLs — they have special meanings (+ = space in query strings, / = path separator). Standard Base64 strings must be percent-encoded when used in URLs.
Best for: Email (MIME), file storage, non-URL contexts
Uses characters: A-Z a-z 0-9 - _ =
Replaces + with - and / with _ — making the output safe to use directly in URLs and filenames without additional encoding. Defined in RFC 4648.
Best for: JWT tokens, OAuth 2.0, URL parameters, filenames
| Original Size | Base64 Size | Overhead |
|---|---|---|
| 100 bytes | 136 bytes | +36% |
| 1 KB | ~1.37 KB | +37% |
| 10 KB | ~13.7 KB | +37% |
| 1 MB image | ~1.37 MB | +37% |
Base64 encoding always increases data size by approximately 33-37%. For this reason, only use Base64 embedding for small files (under 10 KB). Large files should be served as separate resources.
Base64 is a binary-to-text encoding scheme that converts binary data into a string of 64 printable ASCII characters. It allows binary content like images, audio, and encrypted data to pass safely through text-only systems like email servers, URLs, and JSON APIs without corruption.
No — Base64 is encoding, not encryption. It is completely reversible and provides zero security. Anyone can decode a Base64 string instantly. Never use Base64 to hide sensitive information like passwords or personal data. Use proper encryption algorithms like AES-256 for data that needs to be protected.
Standard Base64 uses + and / which have special meaning in URLs. URL-safe Base64 replaces + with - and / with _ making it safe for URLs, query parameters, and filenames without percent-encoding. This variant is commonly used in JWT tokens, OAuth 2.0, and web APIs.
Yes. Base64 encoding increases data size by approximately 33-37%. For every 3 bytes of original data, Base64 produces 4 bytes. This is the trade-off for text compatibility. Use Base64 embedding only for small files (under 10 KB) — large files should be served as separate resources for better performance.
Common uses include: embedding small images in HTML/CSS as data URIs, encoding credentials in HTTP Basic Authentication headers, transmitting binary email attachments via MIME encoding, encoding data in JSON APIs, encoding JWT token segments, and storing binary content in XML documents or text-based configuration files.
Enter your text or paste your data in the input field. Click Encode to convert text to Base64, or Decode to convert Base64 back to plain text. The tool handles standard Base64 and URL-safe Base64. You can also encode files by uploading them — the output is the Base64 data URI.
Base64 encoding is used throughout web development: embedding images directly in CSS/HTML (data URIs), encoding binary data in JSON APIs, transmitting attachments in email (MIME), storing binary data in databases and cookies, and encoding authentication credentials in HTTP Basic Auth headers.
Data URIs: Embed small images directly in HTML/CSS to save HTTP requests. Example: . HTTP Basic Auth: Credentials are Base64 encoded: Authorization: Basic base64(username:password). API payloads: Encode binary data (PDFs, images) for transmission in JSON. JWTs: JWT header and payload sections are Base64URL encoded. Email: MIME encodes attachments using Base64.