Free Base64 Encoder & Decoder: Text, Images, Files

Encode and decode Base64 online for free. Convert text, images, and files instantly in your browser. No upload, no signup, your data never leaves your device.

Base64 is an encoding scheme that converts binary data images, files, any raw bytes into a string of 64 safe text characters (A–Z, a–z, 0–9, + , / ) so it can travel through systems that only handle text. It is not encryption, it doesn't protect anything, and it makes data about 33% larger. Understanding those three facts prevents most of the mistakes people make with it. Try the free Base64 Encoder/Decoder → The Problem Base64 Solves Many systems were designed to move text, not arbitrary binary data. Email protocols, JSON payloads, XML documents, URLs, HTTP headers all of these expect characters, and raw binary bytes passing through them can get corrupted, misinterpreted as control characters, or rejected outright. Base64 sidesteps this by re-expressing binary data using only characters that every system agrees are safe. The data survives the trip intact, then gets decoded back to its original bytes at the other end. That's the entire purpose: safe transport of binary data through text-only channels. How It Works (The Short Version) Base64 reads your data in chunks of 3 bytes (24 bits), then splits those 24 bits into four 6-bit groups. Each 6-bit group has 64 possible values hence "Base64" and each maps to one character from the standard alphabet. Three bytes in, four characters out. That 3-to-4 ratio is exactly why Base64 output is roughly 33% larger than the original data. When the input length isn't divisible by 3, padding characters ( = ) are appended to fill out the final group. That's what those trailing equals signs at the end of Base64 strings are. Base64 Is Not Encryption This matters enough to state plainly: Base64 provides zero security. Anyone can decode a Base64 string in seconds with any online tool, including this one. There's no key, no secret, nothing to crack it's a public, reversible transformation, more like Morse code than a lock. Real-world consequences of confusing the two: Storing passwords Base64-encoded in a database offers no protection whatsoever Base64 in an HTTP Basic Auth header is not "secured" it's plainly readable to anyone intercepting the traffic, which is why HTTPS is mandatory there Base64-encoded config values in a repository are effectively plaintext to anyone who clones it If you need actual protection, you need encryption (AES, for example) or hashing (SHA-256, bcrypt) not encoding. For hashing, the Hash Generator covers MD5, SHA-1, SHA-256, and SHA-512. Common Real Uses Embedding images in HTML and CSS. A Base64 data URI puts the image directly in the markup, eliminating a separate HTTP request: html <img src="data:image/png;base64,iVBORw0KGgo..."> Convert images with the Image to Base64 tool, or go the other direction with Base64 to Image . Email attachments. Every attachment you've ever sent was Base64-encoded in transit this is the original use case that MIME was built around. API payloads. JSON has no binary type, so sending a file through a JSON API means Base64-encoding it into a string field. Data in URLs. Base64url (a variant that swaps + and / for - and _ ) is used in JSON Web Tokens and other URL-embedded data, since the standard alphabet's + and / have special meaning in URLs. When You Shouldn't Use It Large images in CSS or HTML. The 33% size penalty applies to every page load, the encoded blob can't be cached separately from the document, and it bloats your HTML or stylesheet. Rule of thumb: inline only small assets tiny icons, a 1×1 tracking pixel, small SVGs. Anything larger belongs in a separate file. For reducing actual image weight, an image compressor is the right tool, not Base64. Anything requiring security. Covered above use encryption or hashing. Storing large files in a database. Base64-encoding blobs into text columns wastes 33% of storage and adds encode/decode overhead on every read and write. Base64 vs. Other Encodings Encoding Size overhead Typical use Base64 +33% Binary data in text channels: email, JSON, data URIs Hex (Base16) +100% Debugging, hashes, color values, memory dumps URL encoding Varies Special characters within URLs ( %20 for space) Base32 +60% Case-insensitive contexts, some 2FA secret keys Base64 hits the practical sweet spot: notably more compact than hex, while staying safe across nearly every text-based system. Frequently Asked Questions Is Base64 encryption? No. Base64 is encoding, not encryption it's fully reversible by anyone, with no key involved. It provides no confidentiality or security of any kind. How do I decode a Base64 string? Paste it into the Base64 Decoder and it converts back to the original text instantly. The tool runs in your browser, so nothing is uploaded to a server. Why does Base64 end with one or two equals signs? The = characters are padding. Base64 processes input in 3-byte groups, so when the final group is short, padding fills it out to keep the output length a multiple of four. Why is my Base64 string larger than the original file? Base64 represents every 3 bytes of input as 4 chara

Back to Blog | Browse all free tools | Tool Collections