Base64 Encoder / Decoder
Encode text to Base64, decode Base64 to text, and convert files. 100% client-side — no data leaves your browser.
Text ↔ Base64
Enter plain text on the left to encode, or paste Base64 on the right to decode. Supports full UTF-8.
File → Base64
Drag and drop a file or click to browse. The file will be converted to a Base64 string entirely in your browser.
Drag & drop a file here
or click to browse (max 10 MB)
Base64 → File Download
Paste a Base64 string (with or without a data URI prefix) and download it as a file.
What is Base64 Encoding?
Base64 is a binary-to-text encoding scheme that represents binary data using a set of 64 printable ASCII characters. It is widely used across the web and in software development to safely transmit binary data over channels that only support text, such as email (MIME), HTML, CSS, and JSON.
How Base64 Works
Base64 encoding takes groups of three bytes (24 bits) and splits them into four 6-bit values. Each 6-bit value maps to one of 64 characters: A-Z, a-z, 0-9, +, and /. Padding with = is added when the input length is not a multiple of three. This makes the encoded output approximately 33% larger than the original binary data.
Common Use Cases for Base64
- Data URIs: Embed images, fonts, and other resources directly in HTML or CSS using
data:URIs. - API Payloads: Safely include binary data (images, PDFs, files) in JSON or XML API requests and responses.
- Email Attachments: MIME encoding uses Base64 to encode email attachments for transmission over SMTP.
- JWT Tokens: JSON Web Tokens use Base64url encoding (a URL-safe variant) for the header and payload sections.
- Authentication: HTTP Basic Authentication encodes the username:password string in Base64.
- Storing Binary in Text Fields: Store small binary blobs in databases, config files, or environment variables that only accept text.
Base64 vs Base64url
Standard Base64 uses + and / characters, which are not URL-safe. Base64url replaces these with - and _ respectively and typically omits padding. Base64url is used in JWTs and other URL-embedded data.
Is Base64 Encryption?
No. Base64 is an encoding scheme, not an encryption algorithm. Anyone can decode a Base64 string back to its original form. Never use Base64 to protect sensitive data. For encryption, use tools like SecureBin.ai's AES-256 encrypted paste.
Privacy & Security
This Base64 encoder/decoder runs entirely in your browser using JavaScript. No data is transmitted to any server. Your files and text never leave your device, making it safe for encoding sensitive content before sharing through secure channels.