Encode text to Base64 or decode Base64 strings back to readable text. All processing happens in your browser.
Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format using a set of 64 characters (A-Z, a-z, 0-9, +, /). It is commonly used for transmitting data over media designed to handle text, such as embedding images directly in HTML or CSS files, storing binary data in JSON payloads, and encoding credentials in HTTP Basic Authentication headers. Base64 encoding increases data size by approximately 33% but ensures safe transmission through text-based protocols.
Enter any text in the input field and click "Encode" to convert it to a Base64 string. To decode, paste a Base64-encoded string and click "Decode" to see the original text. The tool handles Unicode characters correctly using UTF-8 encoding internally. All encoding and decoding happens directly in your browser for maximum privacy.
This free Base64 encoder is fast, reliable, and completely private. No data ever leaves your device, making it safe for sensitive content like API keys or authentication tokens. Perfect for developers who need quick encoding and decoding during web development, API testing, or working with data URIs. Works offline, requires no registration, and delivers instant results.
Base64 encoding appears in many everyday development and web scenarios. Understanding these use cases helps you recognize when and why to reach for this tool:
data:image/png;base64,...). This reduces HTTP requests at the cost of a larger file size — ideal for small icons or sprites.Authorization header. The format username:password is encoded and sent as Basic base64string. This tool lets you quickly generate or decode those headers during development.multipart/form-data uploads or binary WebSocket frames. Reserve Base64 for small payloads like configuration snippets or thumbnails.= or == padding to make the output length a multiple of 4. Some implementations omit padding, so if you get a "invalid input" error when decoding, try adding the padding back.btoa()/atob() in JavaScript does not handle Unicode characters directly. This tool uses UTF-8 encoding under the hood, ensuring that characters like emoji, Chinese, or accented letters encode and decode correctly.+ and / characters which can cause issues in URLs. For URL parameters, use the URL-safe variant that replaces + with - and / with _, and strips padding.| Concept | Details |
|---|---|
| Character set | A-Z, a-z, 0-9, +, / (64 characters) plus = for padding |
| Size increase | Approximately 33% over the original binary data |
| Padding | Output is padded with = or == to reach a multiple of 4 characters |
| URL-safe variant | Uses - instead of + and _ instead of /, often without padding |
| Common prefix | Data URIs use data:[mime];base64, prefix notation |
No, Base64 is not encryption — it is encoding. Encryption requires a secret key and transforms data such that it cannot be read without decrypting. Base64 simply converts binary data to ASCII text using a publicly known mapping. Anyone can decode Base64 instantly. Never use it to protect sensitive information.
The equals sign (=) is padding. Base64 processes data in groups of 3 bytes, producing 4 characters. When the input length is not a multiple of 3, padding is added so the output length is a multiple of 4. One equals sign means one byte of padding, two means two bytes of padding.
Yes, you can encode any binary file, including images. The resulting Base64 string can be used as a data URI directly in HTML: <img src="data:image/png;base64,...">. However, the encoded string is about 33% larger than the original file, so this is best suited for small images such as icons.
Yes. All encoding and decoding happens in your browser using client-side JavaScript. Once the page has loaded, you can disconnect from the internet and the tool will continue to work perfectly. Your data never leaves your device.