JSON Validator and Linter

Check JSON against the standard and get every problem in one pass, each with its exact position and a plain explanation. When a bracket is missing, the validator also tells you where it most likely belongs.

Input
Output

    Nothing leaves your browser. Shortcut: Ctrl/⌘ + Enter runs the main action.

    What is a JSON validator?

    A JSON validator checks whether text is well-formed JSON as defined by RFC 8259: one value made of objects, arrays, double-quoted strings, numbers, true, false and null, with commas and colons in the right places and every bracket closed. The difference between validators is what they tell you when the answer is no. This one reports every problem in a single pass, gives the line and column of each, explains it in plain words, and offers a repaired version.

    How to validate JSON

    1. Paste the JSON or open a file. Validation runs automatically while you type; the Validate button simply re-checks and scrolls to the result.
    2. Read the status line. Green means valid, with line count, size, number of keys and nesting depth. Red means invalid, with the number of problems.
    3. Click a problem to put the cursor at that line and column. Problem lines are highlighted in red, warnings in yellow.
    4. Fix the problems by hand, or click Fix JSON to repair them and show a formatted result.

    Errors and how they are reported

    What you wroteWhat the validator reportsValid JSON
    {"a": 1,}Trailing comma before "}"{"a": 1}
    {"a": 1 "b": 2}Missing comma after the value on line 1{"a": 1, "b": 2}
    {"a": [1, 2}Expected "]" to close the array opened on line 1{"a": [1, 2]}
    {'a': 'b'}Strings must use double quotes{"a": "b"}
    {a: 1}Property names must be in double quotes{"a": 1}
    {"n": 007, "x": .5}Leading zeros; number starts with a decimal point{"n": 7, "x": 0.5}
    {"ok": True, "v": None}Booleans and null are lowercase{"ok": true, "v": null}
    // commentComments are not allowed in JSONremove the comment

    Finding the missing bracket

    An unbalanced bracket is the hardest JSON error to find by eye, because parsers detect it far from where it happened. Take this file, where the env object lost its closing brace:

    1  {
    2    "name": "api",
    3    "env": {
    4      "LOG_LEVEL": "info",
    5      "DB_POOL": 20
    6    "ports": [8080]
    7  }

    A typical parser complains about line 6 (a missing comma) or about the end of the file. This validator reports the missing comma and the unclosed object, and puts a hint first: the object opened on line 3 is missing its closing "}". Add it at the end of line 5, before line 6. It reaches that conclusion because line 6 is indented exactly like line 3, so it cannot belong inside the object that line 3 opened. Fix JSON inserts the brace there and produces the intended structure, with ports at the top level rather than inside env.

    Warnings that do not make JSON invalid

    When the JSON is valid you can go straight to the JSON formatter, the minifier or the JSON diff.

    JSON validator questions

    How do I find a missing bracket in JSON?

    Paste the JSON here. If an object or array is never closed, the validator names the line where it was opened. For indented JSON it goes further: it looks for the first line inside that object that is indented like the opening line, which is usually where the closing brace should have been, and reports "Most likely cause … add it at the end of line N". Fix JSON inserts the bracket there.

    Why does my JSON fail in JavaScript but look correct?

    Common invisible culprits are a trailing comma after the last item, curly quotes pasted from a word processor or chat app, a non-breaking space (U+00A0) copied from a web page, and a byte-order mark at the start of the file. The validator reports each of these explicitly instead of a generic "Unexpected token".

    Does the validator accept comments or trailing commas?

    No, because standard JSON (RFC 8259) does not. They are reported as errors so you know a strict parser will reject the file. If you are editing JSONC (VS Code settings) or JSON5, those formats allow them; the Fix JSON button converts such files to strict JSON.

    Is a duplicate key an error?

    The JSON standard says keys should be unique but does not forbid duplicates, and most parsers silently keep the last value. That makes duplicates a common source of bugs, so the validator shows them as warnings with the line of the first occurrence while still calling the document valid.

    What does Fix JSON change?

    It removes trailing and extra commas and comments, adds missing commas and colons, converts single and curly quotes, quotes unquoted keys and text, lowercases True/False/None, normalises numbers such as .5 and 007, and closes brackets, using the indentation to decide where. Always review the output: a guessed bracket position or an unquoted word may not be what you meant.

    Can it validate against a JSON Schema?

    Not yet. This page checks syntax: whether the text is well-formed JSON. Schema validation (required fields, types, formats) is a separate step that needs the schema as a second input.