Base64 & URL-encode JSON
Encode JSON into Base64 for tokens and data URIs, or URL-encode it for safe use in a query string — and decode either format straight back to formatted JSON.
One tool, two encodings
Switch between Base64 and URL-encoding without leaving the page — both directions, both formats.
Frequently asked questions
Why would I Base64-encode JSON?
Base64 encoding is common for embedding JSON payloads in places that only accept plain ASCII text, such as JWT tokens, HTTP headers, config files, or data URIs.
When should I use URL-encoding instead of Base64?
URL-encoding is the right choice when you need to pass a JSON string as a query parameter in a URL, since it escapes characters like spaces, &, and ? that would otherwise break the URL.
Does encoding change my JSON data?
No. Both Base64 and URL-encoding are fully reversible — decoding the output gives you back the exact original JSON, byte for byte, including full Unicode support.