Base64 encode and decode
Encode text to Base64 or decode Base64 back to text in your browser. Handles UTF-8 and emoji, with a URL-safe option. Nothing is uploaded.
How it works
Base64 turns any bytes into 64 safe ASCII characters (A-Z, a-z, 0-9, + and /), so binary data can travel through email, JSON, URLs and HTTP headers. Every 3 bytes become 4 characters, so encoded text is about a third longer.
The URL-safe variant replaces + and / with - and _ and drops the = padding, which is what JWTs and many URL parameters use. This tool encodes text as UTF-8 first, so accented letters and emoji survive the round trip.
Questions
- Is Base64 encryption?
- No. Anyone can decode it. Use it to transport data, not to hide it.
- Why does my decoded text look garbled?
- The original was probably not UTF-8 text (for example an image or a file in another encoding), or the input is URL-safe Base64 decoded as standard. Try the URL-safe switch.
- Is my text sent anywhere?
- No. Encoding and decoding happen in your browser.
Do this in your code
The same job is one call to the APIStack API, from any language or as a tool for AI agents over MCP. The free plan includes it.
curl -X POST https://apistack.online/api/utilities/base64/v1 \
-H "x-api-key: $APISTACK_API_KEY" \
-H "Content-Type: application/json" \
-d '{"operation":"encode","text":"Hello, World!","variant":"standard"}'