Files

JSON File Inspector

Says whether a JSON file is valid, where it breaks, and what shape it is.

Loading the tool…

Processing happens locally in your browser. What you paste or load is processed by this page and is not uploaded to a server. Nothing is stored unless you use a control that says it stores something, and you can clear anything this site has kept from the privacy page.

How to use this tool

  1. Load or paste the JSON.
  2. Select Inspect the file.
  3. If it is invalid, go to the line and column in the result — that is where the parser stopped, which is usually just after the real mistake.
  4. If it is valid, check the top level and the longest array to find where the records actually are.

What json file inspector does

There are two questions to ask of a JSON file you did not write. The first is whether it parses at all, and if it does not, exactly which line and column stopped it — a character offset in a one-line minified file is not an answer anybody can use. The second question is the shape: how deep does it nest, is the top level an object or an array, how many records are really in there, and which keys turn up on almost everything.

This page answers both. An invalid file gets its failure translated into a line and column, along with the observation that if every line is its own record it is JSON Lines rather than JSON and wants the NDJSON inspector instead. A valid file gets a structural report: top-level type, maximum depth, counts of objects, arrays, strings, numbers, booleans and nulls, the longest array, the minified size, and the keys ranked by how often they appear. Everything runs in your browser and nothing is uploaded.

Frequently asked questions

The report converts it for you. A parser reports a character offset, which is useless in a minified file, so this page translates that offset into a line and column. Note that the position is where the parser gave up, which is usually just after the actual mistake — a missing comma is reported at the token that followed it.

Because that is JSON Lines, not JSON. Several objects one after another with no enclosing array is a valid NDJSON file and an invalid JSON document. Use the NDJSON file inspector, which parses each line separately.

How far the nesting goes at its deepest point. It matters because many downstream systems have a limit — a warehouse variant column, a flattening step, or a schema generator — and something twenty levels deep will need restructuring before it lands anywhere relational. Anything past twelve levels is flagged as worth a look.

It separates content from formatting. A file that is 4 MB on disk and 1 MB minified is three quarters whitespace, which changes what you do about it — compress or re-serialise rather than redesign the payload.