Every developer runs the same loop when a JSON document misbehaves: edit the file, save it, switch to a terminal or another window, run a parser, read the error, switch back, hunt for the offending character, fix, repeat. Each round trip costs only a few seconds, but you pay it dozens of times an hour, and the errors usually arrive without a location. A message like Unexpected token starts a scavenger hunt across three hundred lines of brackets.
The JSON Inspector shortens that loop to a single paste. Validation runs on every keystroke, errors carry a line number, a column number and a plain-English reason, and the output pane gives you both a normalized code view and a collapsible tree. This walkthrough covers the whole surface of the tool: the input loop, the three action buttons, the two output tabs, the example chips and the status line, ending with three habits that keep every iteration fast.
Two loops: the one you know and the one worth switching to
The classic loop treats validation as a separate task. You edit a payload in your editor, save it, switch to a terminal, run it through a parser or a linter, read whatever the parser reports, then switch back and search for the position by hand. If the parser only says the document is invalid, you repeat the trip with a different tool. The inspector loop collapses those steps into one window:
| Step | Slow loop | Inspector loop |
|---|---|---|
| Get feedback | Save, switch windows, run a parser | Live, on every keystroke |
| Error location | Often just a token name, no position | Line, column and a specific reason |
| Next iteration | Re-save, re-run, re-read | Keep typing; the verdict updates itself |
| Formatting | Separate tool or editor extension | Format and Minify buttons built in |
The difference is not only speed. In the slow loop, feedback competes with editing for your attention, so it gets skipped "just this once" — and that is exactly how a malformed payload reaches production. In the fast loop, feedback is continuous and free, so skipping it never feels tempting. That is the accuracy-first part: the check happens where the edit happens, not after the damage is done.
Step 1: Paste once and let validation run as you type
Open the tool and paste your document into the input pane. There is no validate button, because none is needed: the parser runs on every input event. Half-finished documents show a live error; complete ones show a live confirmation. The paste happens exactly once per document, and every subsequent edit is validated automatically.
What matters most is where the errors point. Every failure the parser raises carries a line number and a column number, both counted from 1, plus a specific reason. Paste the Broken JSON example — {"alpha":1, "beta":2,,} — and the output pane reports:
Expected a string key in object (line 1, column 22)
Column 22 of line 1 is the second comma after "beta":2 — the extra one. You do not have to count characters yourself; the number lands you within a character or two of the fault even in minified documents, where line 1 covers the entire payload and the column is the only navigation you have. This is the same location-first philosophy described in our guide to reading JSON syntax errors by line and column: a parser that names the position turns debugging from searching into arriving.
Step 2: Format and Minify do two different jobs
Above the input pane sit three buttons: Format, Minify and Clear. They are not three flavors of the same action, and using the right one at the right moment is half the workflow.
- Format re-prints the document with consistent indentation. Use it to normalize a messy paste — a one-line minified response from a log, or a hand-typed object with uneven spacing — into something you can read. Number tokens come through exactly as written, which matters for the precision case below.
- Minify produces the compact transport copy: no indentation, no unnecessary whitespace. That is the version you paste into a request body, a config field or a test fixture where size counts.
- Clear empties the input and the output together. Use it between payloads so fragments of a stale document never leak into your next check.
Take the payload from the Example chip — an order record with a price, two items and a note. Run Format on it and the structure becomes obvious at a glance:
{
"api": "v2",
"price": 19.9,
"items": [
{ "id": "A1", "qty": 3 },
{ "id": "B7", "qty": 1 }
],
"note": "totals&rounding"
}
Two order items, a top-level note, one decimal price — visible without counting braces. A good rhythm keeps the pretty version as your working document and produces a minified copy only when something needs to travel. If your edit involves rearranging elements rather than fixing syntax, our guide on formatting and reordering JSON arrays covers the pitfalls of doing that by hand.
Step 3: Code for copy-out, Tree for structure
The output pane has two tabs. The Code tab shows the document as normalized text, which is what you want when the next step is copying: take the formatted version back into your editor, or the minified version into a request. The Tree tab renders the same value as a collapsible outline. Objects and arrays display their item counts next to the braces, and the top two levels start expanded.
The two tabs answer different questions. Use Tree when the question is structural: how many entries are in that items array, is note a sibling of items or nested inside it, did the last edit add a fourth element. Use Code when the question is textual: what exactly does the formatted document look like, where does that escape sequence sit inside a string. Switching costs one click, so most sessions bounce between them — check structure in Tree, fix in the input, copy out of Code.
Step 4: Learn what each error looks like before you meet it in the wild
Under the input pane is a row of example chips, and they are more useful than they look. Each one loads a tiny document chosen to exercise a specific parser behavior. Ten seconds with each chip teaches you the failure modes you will meet in real payloads.
Duplicate key. Load the Duplicate key chip, {"id":1,"id":2}, and the parser rejects the document outright:
Duplicate key "id" — rejected, never overwritten (line 1, column 14)
Most parsers silently keep the last value, which turns a key-typing mistake into a data bug that no error message will ever report. Here the second id is treated as an error, located at the point where the duplicate is confirmed. If a consumer elsewhere relies on last-one-wins behavior, this strictness is a fact to know before it surprises you — the tool will not guess for you, and that is deliberate.
Precision boundary. Load the Precision boundary chip: {"a":0.1,"b":1e3,"c":1000.000}. Nothing is rejected — and nothing is rounded. The number tokens keep their exact written form, so 1000.000 still displays as 1000.000 in both output tabs, and 0.1 does not quietly grow trailing digits from binary floating-point conversion. When you are checking monetary values or identifier-like numeric strings, that distinction is the whole game: a parser that converts first and formats later can alter the data before you ever see it.
Broken JSON. The Broken JSON chip is the double-comma document from Step 1. Notice what the error does not say: it does not vaguely blame the document. It names the expectation — a string key in an object — and the exact position where the expectation failed. The JSON Inspector applies the same precision to every other failure: unterminated strings, invalid escapes, digits missing after a decimal point, trailing content after the top-level value. Each gets its own message and coordinates.
The chips also demonstrate the tool's strictness: no comments, no trailing commas, no unquoted keys. Everything that lenient parsers accept and production APIs reject gets flagged here first, where the mistake costs nothing to fix.
Step 5: Read the status line
Below the output sits a one-line status report, easy to overlook and worth reading each pass. On a valid document it reports the verdict plus two counts — the number of values in the document and its size in code units — in a format like Valid JSON · 14 values · 92 code units. On an invalid document it flags the failure and points you to the full message with coordinates in the output pane.
Those counts are not decoration. The value count is a checksum for edits: add a field and the number should move; delete one and it should move again. The code-unit count tells you where you stand against the input limit of 1,048,576 code units, with a depth limit of 128 levels and a ceiling of 50,000 values — far above everyday payloads, but relevant when you paste a machine-generated dump. If a large document ever fails, the status line and the output message together tell you immediately whether the problem was size, depth, value count or syntax.
Three habits that keep the loop fast
- Validate before you paste anywhere else. Make the inspector the first stop for any JSON that was typed by hand, edited in place, or extracted from a log. Validating at the point of editing costs one glance at the status line; discovering the problem in a failing API call costs a request, a response, and a diff to work out which side broke.
- Compare value counts after edits. Note the count before a structural edit, make the change, and check that the count moved by exactly what you intended. It is the cheapest possible regression test for payloads: an accidental array truncation or an unintended extra field both show up as a count that did not move the way you expected.
- Keep the strict mindset. The tool rejects comments, trailing commas and duplicate keys because real consumers do too. Write payloads the strict way from the start — then the strict parser never surprises you, and your documents pass on the first try everywhere else.
Shortening a loop is rarely about moving faster within it. It is about removing the steps that carry no information — the saves, the window switches, the re-runs — until the only work left is the edit itself. Paste once, read the coordinates, fix, and check the counts. The JSON Inspector handles everything else, entirely inside your browser. And when the error you are reading is not a syntax error but a structured failure from an API, our walkthrough of reading Problem Details errors picks up where this one leaves off.
Reproduce every example locally with the JSON Inspector or the matching tool on the workbench. Nothing you paste leaves your browser.