Encode UTF-8 text as standard Base64 or decode Base64 back to readable text.
JSON Formatter
Validate, format or minify JSON locally while preserving original numeric values and key order.
How to use it
- Paste valid JSON, up to 256 KiB and 128 nesting levels.
- Choose two-space indentation, four-space indentation or minification.
- Format and inspect the output, then copy or download it as text.
Examples
Retain an exact large integer
- Input
- { "id": 9007199254740993, "ok": true }
- Result
- Minified: {"id":9007199254740993,"ok":true}. The integer digits remain unchanged.
Formatting without changing JSON tokens
Validation uses the browser JSON parser; formatting changes whitespace around tokens only. Large numeric literals, string escapes, key order and duplicate keys are preserved instead of being reserialized through JavaScript numbers.
The tool does not sort keys, repair malformed JSON, evaluate code or validate a schema. Comments, trailing commas and single-quoted strings are invalid JSON.
Validation and limits
The input limit is 256 KiB in UTF-8 and 128 nested arrays or objects. Indented output is capped at 4 MiB; minification can avoid excessive indentation. Invalid syntax or excessive nesting clears any previous output and shows a generic error without repeating your data.
Duplicate keys are accepted by the JSON parser and preserved, but consumers may interpret them differently. Formatting does not establish that a payload is safe to execute or send elsewhere.
Questions, answered.
Will large integers lose precision?
No. The formatter retains the source number tokens. It does not stringify the parsed JavaScript object.
Can this fix JSON with comments?
No. Strict JSON does not allow comments or trailing commas. Correct the syntax and run again.
Does formatting remove duplicate keys?
No. Key order and duplicate key tokens are retained. Check how your intended consumer treats duplicates.
Related tools
Percent-encode a URL component or decode it back to text, without visiting any address.
Decode a JWT header and payload locally and inspect its unverified time claims.