View My JSON
Skip to main content

View My JSON · validator

JSON Validator Online

Check whether a payload parses before you debug business logic. Fix syntax, then explore structure as UI.

A small document with two mistakes

{
  "name": "build-config",
  "retries": 03,
  "targets": ["web", "api",],
  "debug": true
}

Two errors: 03 has a leading zero and the array has a trailing comma. A strict parser reports the first one it meets, so fix 03 to 3, validate again, then remove the comma after "api".

Why use this

  • Instant syntax validation in the browser
  • Format after you confirm the document parses
  • Explore valid JSON as Cards, Table, or Tree
  • No separate “lint only” tab required

When it helps

  • An API returns “almost JSON” with trailing commas
  • A log line was truncated mid-object
  • You need a free JSON checker before committing a fixture

How to use it

  1. Paste the payload into View My JSON.
  2. Click Validate to confirm it is valid JSON.
  3. Format, then switch views to read nested data.

What validation checks

A validator answers one narrow question: does this text conform to the JSON grammar in RFC 8259? It does not tell you whether the data is correct for your application. A document can be perfectly valid JSON and still have a negative quantity, a misspelled key or a string where your code expects a number. Checking those rules needs a schema or application logic, which is a separate step.

What validation does catch is anything a parser would reject, which is exactly what would otherwise break your code at runtime.

The errors you will actually see

Trailing commas, such as a comma after the last item in an array or object, are the most frequent. Next come single-quoted strings (JSON requires double quotes), unquoted keys, and comments, which JSON does not allow at all. Values like undefined, NaN and Infinity are not valid JSON literals; only true, false and null are. Numbers cannot have leading zeros, so 007 fails while 7 and 0.7 are fine. Strings cannot contain raw control characters, so a literal line break inside a string must be written as \n.

Structural errors are the other group: a missing comma between two members, a missing colon, or a bracket that never closes.

Reading the error position

Parsers report where they gave up, not where you made the mistake. For a missing comma, the error usually points at the start of the next key, because that is the first token that did not fit. For an unclosed brace, the error often points at the very end of the input, since the parser ran out of text while still waiting for the close. So look at the reported position, then read backwards from there.

Exact wording and the way the position is given, as a line and column or as a character offset, differ between parsers. The habit that works everywhere is to find the position, check the token just before it, and look for a missing comma, quote or bracket.

A practical workflow

Run Validate, fix the first error, then run it again. Later errors are sometimes side effects of the first one, so fixing from the top down saves effort. Once the text passes, Format it and switch to Cards, Table or Tree to check that the structure matches what you expected. Validation happens in your browser, so you can check a payload without sending it anywhere.

What to do after it passes

A valid document is the start, not the finish. Look at the data in Tree or Table view and check the things the grammar cannot: are the required keys present, are numbers actually numbers, are dates in the format your code parses? If you need those rules checked automatically, a JSON Schema validator in your test suite is the right tool, and this page is the quick check you use before you get that far. Also watch for duplicate keys. RFC 8259 says names within an object SHOULD be unique, and parsers handle duplicates differently, with many keeping the last value, so a document with repeated keys is risky even if it parses.

Core viewing, formatting, and validation run in your browser — no account required for those steps. Still strip secrets before pasting into any online tool. Details: privacy policy · about.

FAQ

How do I validate JSON online?

Paste your text into View My JSON and run Validate. If it fails, fix the reported syntax issue, then format and view.

Is the JSON validator free?

Yes. Validation is part of the free core toolkit.

Related JSON tools

Guides in this cluster

More guides on the blog · Compare View My JSON with other tools