JSON5 Validator screenshot

JSON5 Validator

Check whether text is valid JSON5 and get a line and column when it is not. Handles comments, unquoted keys and trailing commas.

Privacy First
0 Runs
Updated 2026-11-06
No upload
Instant
No signup

What validating JSON5 does

The whole document is parsed with the JSON5 reader and the result names its top-level type. A failure reports the first position where the document stops being valid JSON5, with line and column, rather than a generic parse error: the difference between line 4 and line 9 is usually the difference between a found typo and a search. A construct outside the supported subset is an error, never a silent acceptance, so a document that passes here is one the formatter can also convert.

How to use it

JSON5 Validator: paste the JSON5 into the box above, and press Run to get the validation result below.

Worked example

Input:

{
  // comment
  unquotedKey: 'value',
  trailing: [1, 2, 3,],
}

Output:

Valid JSON5.

Top-level type: object

Why it runs in your browser

The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads JSON5 and returns validation result; reloading the page discards both.

The whole document is parsed with the JSON5 reader and the result names its top-level type. A failure reports the first position where the document stops being valid JSON5, with line and column, rather than a generic parse error: the difference between line 4 and line 9 is usually the difference between a found typo and a search. A construct outside the supported subset is an error, never a silent acceptance, so a document that passes here is one the formatter can also convert.

Check whether text is valid JSON5 and get a line and column when it is not. Handles comments, unquoted keys and trailing commas.

How to use it

JSON5 Validator: paste the JSON5 into the box above, and press Run to get the validation result below.

Why it runs in your browser

The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads JSON5 and returns validation result; reloading the page discards both.

What to Expect

Best for

  • Converting JSON5 to validation result when the data is already on screen.

What this tool keeps

  • Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere.

Sample input

{ // comment unquotedKey: 'value', trailing: [1, 2, 3,], }

Sample output

Valid JSON5. Top-level type: object

Frequently asked questions

How do I use the json5 validator?

JSON5 Validator: paste the JSON5 into the box above, and press Run to get the validation result below.

Is my input uploaded?

No. The text is parsed on this page with JavaScript and is never posted to a server.

Is there a size limit?

Yes: 5 MB per run. Larger input is refused with a message rather than freezing the tab.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.