Convert text, files, and images to and from Base64 instantly. URL-safe mode, MIME line wrapping, live byte stats. Runs entirely in your browser.
| Use Case | Example / Format | Variant | Note |
|---|---|---|---|
| Image data URI | data:image/png;base64,iVBORw0K… | Standard | Embed images inline in HTML/CSS |
| JWT tokens | eyJhbGciOiJIUzI1NiJ9.eyJzdWI… | URL-safe | Header.Payload.Signature, no padding |
| HTTP Basic Auth | Authorization: Basic dXNlcjpwYXNz | Standard | username:password encoded |
| Email attachments | Content-Transfer-Encoding: base64 | MIME (76-char wrap) | MIME email standard requires line breaks |
| CSS/HTML data URIs | background: url(data:image/svg+xml;base64,…) | Standard | Inline fonts, icons, small images |
| API file upload | {"file": "JVBERi0xLjQ…"} | Standard | Send binary files in JSON payloads |
| URL query params | ?data=SGVsbG8t V29ybGQ | URL-safe | Avoids + and / breaking URL parsing |
| Cookie values | Set-Cookie: session=dG9rZW4… | URL-safe | Safe characters for cookie storage |
= padding characters are added to make it so. This overhead is the price of making binary data text-safe.+ 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.