Skip to content
XUtilHub

JSON Validator – Check & Lint JSON Online

Validate JSON online and find syntax errors instantly, with line and column numbers. Free JSON lint tool that formats valid JSON too.

  • Free, no sign-up
  • Runs in your browser, nothing uploaded
JSON

About the JSON Validator

Check whether your JSON is valid. If it isn't, the validator shows the error message along with the line and column, so you can fix it fast.

Key features

  • Strict RFC 8259 / ECMA-404 JSON validation
  • Error message with exact line and column
  • One-click 'Try to fix' for common mistakes
  • Shows the root type of valid JSON
  • Format valid JSON with one click
  • Runs locally; safe for tokens and private data

What does a JSON validator do?

A JSON validator checks that text is well-formed JSON: every string is double-quoted, brackets and braces are balanced, commas sit between items (never after the last one), and only valid values are used. If anything is wrong, it tells you what and where.

Invalid JSON is one of the most common causes of failed API calls, broken builds and crashed config loaders, and the error messages from those systems are rarely helpful. Validating first saves a lot of guesswork.

Valid vs. invalid examples

InputValid?Why
{"name": "Ada"}✅Correct object
{'name': 'Ada'}❌Single quotes are not allowed
{name: "Ada"}❌Keys must be quoted strings
{"a": 1,}❌Trailing comma
[1, 2, 3]✅Arrays are valid documents
{"n": NaN}❌NaN isn't a JSON value
"hello"✅A single string is a valid document
{"a": 1} {"b": 2}❌Two documents; use JSON Lines instead

Reading error messages

When validation fails you'll see a message like:

Expected ',' or '}' after property value in JSON at position 27 (line 3, column 5)

Go to line 3, column 5. The real mistake is usually just before that point, typically a missing comma at the end of the previous line or an unclosed string.

Common causes of invalid JSON

  • Copying from JavaScript code. JS object literals allow unquoted keys, single quotes and trailing commas; JSON doesn't.
  • Hand-editing config files. A missing comma after adding a new line is the classic mistake.
  • String concatenation. Building JSON by gluing strings together often breaks escaping. Use a serializer such as JSON.stringify.
  • Smart quotes. Word processors and chat apps replace " with “ ”, which aren't valid.
  • Truncated output. Logs or terminals that cut long lines produce unbalanced brackets.

Fixing it automatically

Click Try to fix: the validator runs a repair step that adds missing quotes, removes trailing commas and comments, converts single quotes and closes unbalanced brackets. Always review the result, because the repairer has to guess what you meant. For more control, use the dedicated JSON Fixer.

Once your JSON is valid, format it, explore it as a tree, or compare it with another version. For TOML files, use the TOML Validator.

How to use the JSON Validator

  1. Paste your data into the input box, upload a file, or click Sample to try it out.
  2. Adjust the options above the editor if you need to (indentation, delimiter, and so on).
  3. The result appears instantly in the output panel. Any errors are shown with their line and column.
  4. Click Copy to copy the result, or Download to save it as a file.

Frequently asked questions

What standard does the validator use?

It uses your browser's native JSON parser, which follows the JSON standard (RFC 8259 / ECMA-404). That's the same parser your JavaScript applications use, so if it passes here it will parse in production.

Is JSON with comments valid?

No. Standard JSON has no comments. Formats like JSONC (used by VS Code settings) and JSON5 allow them, but strict parsers reject them. The 'Try to fix' button strips comments for you.

Does the validator check my data against a schema?

No. This tool checks syntax only, i.e. whether the text is well-formed JSON. Checking that fields have the right names and types requires JSON Schema validation.

Why is a single value like 42 or "hello" valid?

Since RFC 7159, any JSON value, not just an object or array, is a valid JSON document. Some older systems still expect an object at the top level.

Is my JSON uploaded to a server?

No. All JSON tools run entirely in your browser, so your data never leaves your device.

Is there a size limit?

There is no fixed limit. Files of several megabytes work fine; very large files depend on your device's memory.

Do I need an account?

No. Every JSON tool is free and works without signing up.

Last updated:

Related JSON tools