JSON validator
Find out whether it is valid JSON, and exactly where it is not.
Paste JSON or open a file. If it is valid you get it formatted, with a count of keys, array items and nesting depth. If it is not, you get the line, the column and what went wrong in words — a trailing comma, a single quote, a comment, a string that was never closed.
How to use it
- Paste your JSON, or open a .json file.
- If there is an error, the line and column appear straight away.
- Once it is valid, pick an indent and copy the formatted result.
Why use this tool
Completely private
Everything runs inside your browser. Your files and text are never sent to a server.
Free, with no limits
No sign-up, no watermarks and no cap on how many times you can use it.
Instant results
There is no upload or queue to wait for, so results appear as fast as your device can work.
Works on any device
Runs in any modern browser on phone, tablet or desktop. Nothing to install.
Frequently asked questions
- Why does my browser's error message not say where the problem is?
- Because recent versions of Chrome stopped including a position. You get an "unexpected token" complaint and a four-hundred-line file to search by eye. This tool does not rely on that message — it reads through the document itself and reports the line and column, which is the only thing you actually needed.
- Why is my file rejected when it looks fine?
- Almost always one of four things: a comma after the last item in a list or object, single quotes instead of double, a comment, or a line break inside a string. All four are perfectly normal in JavaScript and none of them are allowed in JSON. The error message here names whichever one it found.
- Does it accept JSON5 or JSONC?
- No, deliberately. Those formats allow comments and trailing commas, and accepting them here would mean telling you a file is fine when the parser you are actually feeding it to will reject it. This accepts exactly what the JSON standard allows, which is exactly what your code will accept.
- How big a file can it handle?
- Large ones — it is limited by your device's memory, not by an upload limit, because there is no upload. A few megabytes is comfortable. Very large documents will make the browser pause while it works, since the formatting happens on the same thread that draws the page.
- Is my data sent anywhere?
- No. The checking happens inside your browser and nothing is transmitted, which matters here more than on most tools — JSON pasted into a validator is very often an API response with real customer data or a token in it.