Encode & decode text, URLs and images to/from Base64. URL-safe encoding, file support — all browser-based.
KJSynthora's Base64 tool supports three modes — text encoding, image conversion, and URL encoding — all running entirely in your browser with zero server uploads.
Base64 is a binary-to-text encoding scheme that converts binary data into a sequence of printable ASCII characters. It uses a 64-character alphabet consisting of uppercase letters (A–Z), lowercase letters (a–z), digits (0–9), and the symbols + and /, with = as padding.
Base64 groups the input into 3-byte blocks (24 bits), then splits each block into four 6-bit groups. Each 6-bit group maps to one of the 64 characters in the alphabet. This means every 3 bytes of input produces 4 characters of output, resulting in a size increase of approximately 33%.
Three common encoding schemes are used in web development — here is how they compare:
| Encoding | Input | Output | Size Change | Use Case |
|---|---|---|---|---|
| Base64 | Any binary | A-Z, a-z, 0-9, +/= | +33% | JWT, emails, data URIs |
| URL Encoding | URLs / text | %XX percent codes | Varies | Query strings, form data |
| Hex (Base16) | Any binary | 0-9, A-F | +100% | Hashes, cryptography, debugging |
| Base64Url | Any binary | A-Z, a-z, 0-9, -_ | +33% | JWT, OAuth, URL-safe tokens |
Base64 is a binary-to-text encoding that converts any binary data into 64 printable ASCII characters. Use it when you need to transmit binary data (like images or files) over text-based protocols such as email, JSON APIs, or HTML data URIs. It is also essential for JWT tokens and HTTP Basic authentication.
Paste your text into the Input field on this page and click the Encode button. The Base64-encoded result appears instantly in the Output panel. You can then copy it to clipboard or download it as a file. No signup or account is needed — it is completely free.
Paste your Base64 string into the Input field and click the Decode button. The tool validates the format and shows the decoded text. If the string is not valid Base64, an error is displayed. You can also use Auto Detect to automatically determine whether to encode or decode.
Yes. Click the Image to Base64 tab, then drag and drop or upload any JPG, PNG, WEBP, GIF, or SVG image. The tool instantly generates the Base64 string, the full data URL, a ready-to-use HTML img tag, and a CSS background-image snippet. You can copy any of these formats directly.
Base64 encodes every 3 bytes of binary input as 4 ASCII characters. This 4/3 ratio means the output is approximately 33% larger than the original. For example, a 100 KB image becomes roughly 133 KB when Base64 encoded. This is a known trade-off for safe text-based transmission.
Standard Base64 uses + and / characters which are not URL-safe. Base64Url replaces + with - and / with _, and removes padding = characters. Base64Url is used in JWT tokens, OAuth flows, and any context where the encoded string appears in a URL or filename.
Yes. All encoding and decoding happens entirely inside your browser using JavaScript. No data is sent to any server, and nothing is stored or logged anywhere. Your input stays completely private on your device.
URL encoding (percent encoding) replaces special characters in URLs with a % followed by a two-digit hexadecimal code. For example, a space becomes %20. It is used specifically for URLs and query strings, not for general binary data transmission. Base64 is for encoding any binary data as text, while URL encoding is for making URLs safe.