Convert text to Base64 and decode it back
Encode UTF-8 text or a file to Base64, decode a string, and switch URL-safe alphabet. Runs in the browser.
Paste a Base64 string to get text, or type text to encode it into Base64. Both directions work in the same tool.
URL-safe mode (− and _) and 76-char MIME wrapping are available. Everything runs locally — nothing is uploaded.
For images, use the data URL builder in the same tool.
The string aGVsbG8= is the UTF-8 bytes of hello, grouped into 6-bit chunks. It is not encryption: anyone can reverse it. A file and the same characters pasted as text do not match, because a file includes its raw bytes and text includes only what you typed. URL-safe mode replaces + with - and / with _. Mail gateways wrap lines at 76 characters; delete those breaks before decoding or the length will not be a multiple of four. Padding = can be missing on purpose. This page starts in text mode. The data-URL builder for images lives on the full Base64 tool.
FAQ
Is URL-safe Base64 supported?
Yes. Enable the URL-safe alphabet (− and _) in the mode panel.
Why does decode fail?
Usually a truncated string or mixed alphabets. Check = padding.
Is it safe for passwords?
Base64 is not encryption. Use proper hashing and storage for secrets.
