JSON Validator
Check whether your JSON is valid and find the error.
- 100% Free
- No Sign Up
- Works in Your Browser
JSON validator
Check JSON and find syntax errors
More Developer Tools
View all tools- JSON formatterPretty-print and indent JSON
- JSON minifierStrip whitespace from JSON
- XML formatterIndent XML so it's readable
- SQL formatterFormat SQL queries for readability
- HTML formatterBeautify and indent HTML
- Base64 encode/decodeEncode and decode Base64 text
- JWT decoderDecode a JSON Web Token
- UUID generatorGenerate random v4 or time-ordered v7 UUIDs
- Timestamp converterConvert Unix epoch time to dates
Every everyday developer tool, right in your browser.
No installs. No uploads. No signup.
Browse all 36 tools- Developer tools
- 36
- Cheat sheets
- 10
- Bytes uploaded
- 0
How to use the JSON validator
Three steps, all in your browser.
- 1
Paste your input
Type or paste your code or data. Press Sample to try an example.
- 2
Pick the style
Choose indentation or options. The result updates as you type.
- 3
Copy the result
Copy the output in one click. Nothing is saved or sent anywhere.
JSON Validator: what to know
The JSON validator tells you straight away whether your text is valid JSON and, if not, where the first error is. It uses a strict parser that follows the JSON grammar from RFC 8259 and ECMA-404, reporting the line and column of the first error, so anything it accepts will parse in any standards-compliant library, including JSON.parse.
Most invalid JSON comes from a short list of mistakes: a comma after the last item in an object or array, strings or keys in single quotes, keys without quotes, comments, special values such as NaN, Infinity or undefined, and raw control characters such as a tab or newline inside a string, which must be written as \t or \n. JavaScript object literals allow several of these, which is why copying an object from code often fails.
This checks syntax only. Whether the data has the fields and types your application expects is a separate question, answered by a JSON Schema validator or by type checks in your code.
Popular uses
- Finding why an API rejects a request body
- Checking a package.json or tsconfig after hand edits
- Validating JSON copied from documentation or chat
- Confirming a generated file is well-formed before deploying
Tips for the best result
- Fix errors one at a time from the top: a single missing quote can make the parser report a problem further down.
- Smart quotes (“like these”) pasted from a document or chat app aren't valid JSON quotes; replace them with straight double quotes.
- tsconfig.json and VS Code settings allow comments (JSONC), so they can be valid for their tools and still fail strict JSON validation.
Read how JustYourDev works and our privacy details. Code, data and files you use here are processed in your browser and are never sent to our server.