Read the structure, not just the whitespace
JSON Formatter & Validator Online — Beautify, Minify & Inspect
A formatter can make valid JSON readable. It cannot make broken JSON trustworthy. DevSexy keeps those jobs separate and shows exactly where parsing stopped.
Raw JSON
{"user":{"id":17,"roles":["editor"]}}Parsed value
object · 1 root key · 2 nested values
Tree path
$.user.roles[0] → “editor”
From raw payload to navigable structure
Error anatomy
Line and column are clues; the preceding token is often the cause.
A missing comma or quote can surface one token later. The diagnostic keeps the parser message, offset, line, column, and nearby source together so you can repair the real boundary.
2 "name": "Mole" 3 "active": true 4 "roles": ["admin"] ▲ comma expected before this key
Formatting choices change the diff, not the data
Indentation
Two spaces is compact, four is easier to scan, and tabs follow editor policy. All three preserve parsed values.
Key order
Sorting keys creates stable fixtures but can make human-authored configuration harder to review. It is opt-in.
Minification
Minifying removes insignificant whitespace. It does not compress strings, rename keys, or reduce numeric precision.
Strict JSON is not JSONC
Comments, trailing commas, unquoted keys, NaN, and Infinity are common in JavaScript-adjacent files but invalid in RFC JSON. Diagnose first; do not silently rewrite a different language.
✓ Strict JSON: strings, numbers, booleans, null, arrays, objects
× JSONC extras: comments and trailing commas
Use JSONPath after the document parses
Querying a malformed document produces misleading results. Validate, inspect the tree, then copy a path from the structure you can see.
$[0].id$.users[*].email$..statusJSON formatter questions
- Does formatting change JSON values?
- No. Formatting only changes insignificant whitespace unless you explicitly enable key sorting.
- Can I format a large JSON document?
- Yes. Work is scheduled in a Web Worker so the page stays responsive; processing is adaptive rather than blocked by an arbitrary character ceiling.
- Why does the error point after the actual mistake?
- A parser usually reports where the grammar became impossible, which can be the token after a missing comma, quote, or bracket.
- Is JSONPath the same as JSON Pointer?
- No. JSONPath selects values with query expressions, while JSON Pointer identifies one location using slash-separated reference tokens.