Home All Tools About Contact
100% client-side  ·  Files never leave your device  ·  No server, no storage, no tracking
Detecting…
Plain Text
Base64
Image Preview
Preview
Input size
bytes
Output size
bytes
Size change
overhead
Valid Base64
Size Comparison
Input— bytes
Output— bytes
Base64 encoding adds approximately 33% overhead — every 3 bytes of input become 4 bytes of Base64
Options
URL-safe Base64
Replaces + with - and / with _ · Removes = padding · Safe in URLs and filenames
MIME line wrapping
Inserts line break every 76 characters · Required by MIME/email standards
Strip whitespace from input
Removes spaces, tabs, and line breaks before decoding · Useful for pasted Base64

Common Base64 Use Cases

Use CaseExample / FormatVariantNote
Image data URIdata:image/png;base64,iVBORw0K…StandardEmbed images inline in HTML/CSS
JWT tokenseyJhbGciOiJIUzI1NiJ9.eyJzdWI…URL-safeHeader.Payload.Signature, no padding
HTTP Basic AuthAuthorization: Basic dXNlcjpwYXNzStandardusername:password encoded
Email attachmentsContent-Transfer-Encoding: base64MIME (76-char wrap)MIME email standard requires line breaks
CSS/HTML data URIsbackground: url(data:image/svg+xml;base64,…)StandardInline fonts, icons, small images
API file upload{"file": "JVBERi0xLjQ…"}StandardSend binary files in JSON payloads
URL query params?data=SGVsbG8t V29ybGQURL-safeAvoids + and / breaking URL parsing
Cookie valuesSet-Cookie: session=dG9rZW4…URL-safeSafe characters for cookie storage

Frequently Asked Questions

What is Base64 encoding?
Base64 is an encoding scheme that converts binary data into a string of 64 printable ASCII characters (A–Z, a–z, 0–9, +, /). It's used whenever binary data needs to be stored or transmitted over systems that handle only text — like embedding an image in HTML, sending files in JSON, or encoding credentials for HTTP Basic Auth. It's an encoding, not encryption — anyone can decode it.
Why does Base64 add 33% overhead?
Base64 maps every 3 bytes (24 bits) of input into 4 ASCII characters (each representing 6 bits). So 3 bytes in → 4 bytes out = a 33.3% size increase. If the input isn't divisible by 3, = padding characters are added to make it so. This overhead is the price of making binary data text-safe.
What is URL-safe Base64?
Standard Base64 uses + and / which have special meanings in URLs (+ = space, / = path separator). URL-safe Base64 replaces them with - and _ respectively, and usually omits the = padding. This variant is used in JWT tokens, OAuth flows, and anywhere Base64 appears in a URL or filename.
Is Base64 the same as encryption?
No — Base64 is purely an encoding format, not encryption. It provides zero security. Anyone with a Base64 string can decode it instantly, as this tool demonstrates. Never use Base64 to "hide" sensitive data. For security, use actual encryption (AES, RSA, etc.) and then optionally Base64-encode the cipher output for transport.
What is MIME line wrapping?
The MIME email standard (RFC 2045) requires Base64-encoded content to be wrapped at 76 characters per line. This was originally for compatibility with old mail systems that couldn't handle very long lines. If you're using Base64 for email attachments or MIME-formatted content, enable this option. For web use (data URIs, JWT, APIs) you don't need it — line breaks would break things.