Boneyard Tools

JSON File Validator and Analyzer

Drop in a .json file to check whether it is valid and see how it is built. If parsing fails you get the error message with the line and column where it breaks. If it is valid you get the root type, the total key count, the maximum nesting depth, a tally of values by type, and the minified versus pretty size. The file is read entirely in your browser and never uploaded.

How to validate a JSON file

  1. Drag a .json file onto the box, or click to browse for one.
  2. Read the valid or invalid badge; if invalid, the error shows the line and column.
  3. When valid, review the structure stats and the minified versus pretty size.

Examples

A small valid object

{"a":1,"b":[true,null,"x"]}
Valid, root object, 2 keys, max depth 2, 1 array, 1 number, 1 boolean, 1 null, 1 string

A file with a syntax error

{ "name": "Ada", }
Invalid: trailing comma, with the error line and column highlighted

Frequently asked questions

Is my JSON file uploaded anywhere?

No. The file is read and validated entirely in your browser using JavaScript. Nothing is sent to a server, so configuration files, API responses, and other sensitive data stay on your device.

How does the in-browser validation work?

The file is decoded as UTF-8 and passed to the browser's built-in JSON parser. If it parses, the tool walks the resulting value to count keys, value types, and nesting depth. If it fails, the parser's own error message is shown.

What do the line and column numbers mean?

When the parser reports a character position for the error, the tool converts that position into a 1-based line and column so you can jump straight to the problem. Some errors report no position, in which case only the message is shown.

How is the nesting depth counted?

Depth counts levels of containers along the deepest path. A single scalar or a flat array or object is depth 1, and each object or array nested inside another adds one more level. Scalar values do not add a level of their own.

Why are the minified and pretty sizes different?

The minified size is the length of the value re-serialized with no whitespace, and the pretty size uses two-space indentation. Comparing them shows how much of the original file is formatting versus data.

Does it accept files with a byte-order mark?

Yes. A leading UTF-8 byte-order mark is detected and stripped before parsing, so a file saved by an editor that adds one still validates correctly.

Related tools