Encode text or JSON to Base64, or decode a Base64 string back to readable text, instantly and without signup. Everything runs in your browser, so tokens, API payloads and config values you paste here are never uploaded. The tool handles UTF-8 (accents, emoji), has a one-click URL-safe switch for Base64url, accepts files, and decodes input with or without = padding.
Base64 is a way of writing binary data using only 64 safe, printable characters: A–Z, a–z, 0–9,+ and /. It takes the input three bytes at a time and writes each group as four characters, adding=at the end when the input doesn't divide evenly. That is why Base64 output is always about 33% larger than the original. It exists so that binary or special-character data can travel through systems that only handle plain text, such as JSON, email, HTML and URLs. For a deeper walkthrough, read What is Base64 encoding and when should you use it.
| Text | Base64 | Base64url (URL-safe) |
|---|---|---|
Hello | SGVsbG8= | SGVsbG8 |
Hello, World! | SGVsbG8sIFdvcmxkIQ== | SGVsbG8sIFdvcmxkIQ |
{"user":"alice"} | eyJ1c2VyIjoiYWxpY2UifQ== | eyJ1c2VyIjoiYWxpY2UifQ |
subjects?_d>> | c3ViamVjdHM/X2Q+Pg== | c3ViamVjdHM_X2Q-Pg |
José 🚀 | Sm9zw6kg8J+agA== | Sm9zw6kg8J-agA |
The fourth row shows why the two variants exist: standard Base64 uses + and /, which have special meaning in URLs, while Base64url swaps them for - and _ and drops the padding.
Use standard Base64 for email, data URIs and most APIs. Use Base64url whenever the value will appear in a URL, a query string or a filename, and in the parts of a JWT: it replaces + with -, / with _ and removes the trailing =. When decoding, this tool accepts both forms and adds missing padding for you. To read the header and payload of a token, use the JWT decoder.
Percent-encode query values with URL Encode / Decode, escape special characters in strings with JSON Escape, or create fingerprints with the hash generator.
Base64 converts binary data into ASCII text using 64 printable characters (A-Z, a-z, 0-9, +, /). It's used to safely transmit binary data through text-only channels like JSON, XML, email, and URL parameters.
Use Base64 when embedding images in JSON/HTML (data URIs), transmitting binary files through APIs, encoding JWT payloads, or sending email attachments. It increases data size by ~33% but ensures safe text transport.
No. Base64 is an encoding scheme, not encryption — anyone can decode it. It's designed for data transport compatibility, not security. Never use Base64 alone to protect sensitive data.