JSON formatter
Local processing · No uploads
Validate, format and compact JSON with precise errors, preserving large integers and key order.
Usage & limits
How to use
- Paste strict JSON into Input. Enhanced editing is optional.
- Choose Format, Compact or Validate. Unescape only unwraps one JSON string whose contents remain valid JSON.
- After completion, read Result. On failure, use the status line and column to fix the input, then run again.
Input and output examples
- Example input
{"id":9007199254740993,"ok":true}- Expected output
{ "id": 9007199254740993, "ok": true }
- Example input
{ "items": [1, 2], "ok": true }- Expected output
{"items":[1,2],"ok":true}
Formats and limits
- Accepts every strict JSON value, including arrays, strings and null. Comments and trailing commas are rejected.
- Two-space formatting and compaction preserve strings, duplicate keys and numeric lexemes. Error lines and columns start at 1; columns use editor UTF-16 positions.
- Unescape decodes one JSON string layer whose contents must remain valid JSON. Input is limited to 1 MiB UTF-8, depth to 128 and output to 8 MiB.
Content is processed in this page, without uploads or site history. First load and on-demand assets need a network. Clear or leave to release tool content; browser-managed restoration is outside the tool’s control.
Browser agent usage
These are interactive browser tools, not HTTP computation APIs. Computation requires JavaScript; initial page and on-demand asset loading need a network.
- Input method
- Fill Input with strict JSON: objects, arrays and scalars are accepted; comments and trailing commas are rejected. Enhanced editing is optional.
- Reading results
- Format, Compact and Unescape put text in the read-only Result field. Validate reports success or failure in the status; error line and column numbers start at 1.
Supported operations
- Format: two-space indentation
- Compact: remove structural whitespace
- Validate: check strict JSON
- Unescape: unwrap one valid JSON string
Locate inputs and buttons by their page labels. After an explicit action, wait for the status to finish before reading the current result. Fix failed input first; do not reuse old results after changing input or settings.
Common questions
Will large integers lose precision?
Formatting and compaction operate on source tokens rather than a JavaScript object round trip, preserving numeric text and duplicate keys.
What does enhanced editing add?
Syntax highlighting, folding and error marks load on demand. Basic editing remains usable if loading fails.
Feedback and suggestions
Leave a problem or suggestion for this tool.
Tool inputs stay local. Only text you explicitly enter in feedback is sent to a separate service and may become public after review. Email stays private to the maintainer.
Account-free feedback is not enabled yet. You can still use GitHub Issues (a GitHub account is required).
GitHub Issues ↗Content reviewed: