Did you find this tool helpful?
Encode text or files to Base64, decode Base64 strings back to text. Everything runs in your browser — nothing is ever uploaded.
Base64 is a method of converting binary data into a sequence of printable ASCII characters. It takes 3 bytes of binary data at a time and represents them as 4 characters from a 64-character alphabet (A–Z, a–z, 0–9, +, /). Because it only uses printable characters, it can be safely transmitted through systems that can't handle raw binary data.
The output is always approximately 33% larger than the original data — that's the overhead of the encoding scheme.
Instead of linking to an external image file, you can embed it directly as a Base64 data URL: background-image: url("data:image/png;base64,..."). This reduces HTTP requests at the cost of slightly larger file sizes.
JSON only supports text strings. Binary data like images, audio, or file attachments must be Base64-encoded before embedding in a JSON body, which is common in REST APIs and email attachments (MIME format).
HTTP Basic Authentication encodes username:password in Base64 for the Authorization header. JWT tokens also use Base64URL encoding for their header and payload sections.
Standard Base64 uses + and / characters, which have special meaning in URLs. URL-safe Base64 (also called Base64URL) replaces these with - and _, making the output safe to use in URL query parameters, path segments, and cookies without percent-encoding. Use the URL-safe toggle when working with JWTs or embedding Base64 in URLs.
btoa() and atob() functions. Your text and files never leave your device.= or ==) are added to the end to make the output length a multiple of 4. URL-safe Base64 typically omits these padding characters.