Paste JSON and click Encode JSON to get a Base64 string, or paste a Base64 string and click Decode Base64 to recover the original JSON. Useful for transporting JSON in environments that require plain text — query parameters, HTTP headers, config files, or JWT payloads.
Free, fast, runs in your browser. No login needed.
Encoding first validates that your input is valid JSON, then runs btoa(input) to produce a standard Base64 string. The input JSON is encoded as-is, including any whitespace — so formatted and minified JSON will produce different Base64 strings even if they represent the same data. Minify first if you want a compact Base64 output.
Decoding runs atob(input) to recover the JSON string, then parses and re-formats it with 2-space indentation via JSON.parse() + JSON.stringify().
Standard Base64 only. The tool uses the browser's native btoa()/atob(), which work with the standard Base64 alphabet (A–Z, a–z, 0–9, +, /). It does not handle Base64URL encoding, which replaces + with - and / with _ and omits padding. If you have a Base64URL-encoded string (common in JWTs), replace - with + and _ with / before decoding, and add = padding to make the length a multiple of 4.
Common use cases: embedding JSON in a URL query parameter; storing JSON config in a Base64-encoded environment variable; inspecting Base64-encoded payloads in API responses or JWT claims.
No. The Base64 encoding is applied to the raw JSON string. The data is identical when decoded. However, whitespace from the original input is preserved in the encoded form — different formatting of the same JSON will produce different Base64 strings.
The most common cause is Base64URL encoding. JWT and URL-safe Base64 strings use - instead of + and _ instead of /. Replace those characters and add = padding before decoding. The tool uses standard Base64 (btoa/atob), not Base64URL.
You can decode the Base64 payload segment, but you will need to handle Base64URL normalization manually (replace - with + and _ with /). For full JWT decoding including header inspection and expiry status, use the JWT Decoder tool on this site.
No. Encoding and decoding run entirely in your browser.