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
- Drag a .json file onto the box, or click to browse for one.
- Read the valid or invalid badge; if invalid, the error shows the line and column.
- 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
File Type Identifier
Find out what a file really is from its magic bytes, not its extension. Detects images, audio, video, archives, fonts, and more in your browser. Private.
CSV File Inspector
Inspect a CSV file in your browser: detect the delimiter, encoding and BOM, count rows and columns, guess the header, and preview sample rows. Private.
JSON Formatter
Format, validate and minify JSON online. Pretty-print with custom indentation, sort keys and catch syntax errors. Runs in your browser.
Base64 File Encoder
Encode any file to Base64 and a data URI in your browser. Drop a file to get the raw Base64 and a ready data: URI to copy. Nothing is uploaded.
CBOR Decoder
Decode a CBOR file (RFC 8949) to readable JSON in your browser. Handles integers, byte strings, arrays, maps, tags, and floats. Nothing is uploaded.
ELF Header Inspector
Drop a Linux or Unix binary to read its ELF header: 32 or 64-bit, endianness, file type, CPU architecture, OS ABI and entry point. Runs in your browser.