What it does
Language models often wrap JSON in chat text and code fences, use single quotes or Python values, leave trailing commas, or stop in the middle. Paste the raw output and, if you have one, a JSON Schema. The tool shows four steps with a result for each: extract the JSON from the surrounding text, repair safe mistakes, parse it, and validate it against the schema. Every change it makes is listed, and guesses are marked.
Cleaning
- Extract: markdown code fences (with a selector when there is more than one block), chat text before and after the JSON.
- Repair: comments, Python
None,TrueandFalse, single quotes, curly quotes around strings, unquoted keys, trailing commas,NaNandInfinity(replaced bynulland flagged), and output that was cut off (open strings and brackets are closed and the change is flagged as a guess). - Same code as JSON Repair: the cleaning is done by the same scripts as the LLM output mode of the JSON Repair tool, so the cleaned text is identical.
Validation
Every schema violation is listed with its JSON path (for example $.address.city), the rule that failed and the location in the schema. The checker supports the common JSON Schema keywords (types, enums, ranges, string and array limits, required, additionalProperties, $ref inside the document, allOf, anyOf, oneOf, if/then/else) and tells you about keywords it ignores. Type names in capitals, as used by some providers, are accepted.
Tool-call mode
Paste a tool or function definition (an object with a name and a parameters or input_schema object, in the OpenAI, Anthropic or Gemini shape) and the arguments the model produced. The arguments are cleaned in the same way and checked against the definition. A whole tool call, a tool_use block or arguments copied as a JSON string are unwrapped first, and the tool name is compared with the definition.
Strict-schema hints
Several providers require, for strict structured output, that every object schema sets additionalProperties: false and lists every property in required. The tool warns where a schema does not. This is a heuristic and the rules differ by provider and over time, so check your provider's documentation.
What it cannot catch
- Wrong values. A schema says what shape the data has, not whether it is true. A valid answer can still be wrong.
- Guessed repairs. When cut-off output is closed, the missing data is gone. Check the result against the source.
- Provider rules. Each provider supports a different subset of JSON Schema. A schema that passes here can still be rejected by a provider, and the other way round.
- Ambiguous text. Missing commas or brackets in the middle of the text, or several JSON values in a row, need a human decision, and the tool says so instead of guessing.
Limits
The model text can be up to 4,000,000 characters and the schema up to 2,000,000. The work runs in a background Web Worker so the page stays responsive, and 1 MB of text with a schema is checked in about a second. At most 500 violations are listed (the total is still counted). A check that takes longer than 20 seconds is stopped.
Example: a chat reply that is almost JSON
Models often wrap JSON in chat text and make small mistakes. The built-in example is a reply that starts with “Sure! Here is the user profile you asked for:”, puts the data in a code fence that is never closed, and uses single quotes, a comment, Python’s True and a cut-off ending. The tool works in four steps:
- Extract: pass. The chat text and the code fence are removed (2 changes).
- Repair: pass, with guesses. 16 repairs are applied, including single quotes converted to double quotes, the comment removed,
Trueturned intotrue, and a guessed fix for the cut-off ending. Guesses are marked. - Parse: pass. The result is valid JSON, an object with 6 keys.
- Validate against the schema: fail, with 3 violations, each with its JSON path.
The three violations are: $.age must be an integer but is a string, $.email is not a valid email address, and $.address.zip must be a string but is a number. Valid JSON is not the same as correct data, and this is the step that catches the difference.
Structured output or tool call
Use Structured output to check a reply against a JSON Schema, and Tool call to check the arguments of a function call. The strict-schema hints, for example that every property should be listed in required and that additionalProperties should be false, are heuristics. Check your provider’s documentation.
Frequently asked questions
Why can a repaired result still be wrong?
Repairs that finish cut-off output are guesses, and the tool flags them. A schema check cannot tell whether the values are true or sensible, only whether they have the right shape.
How is this different from the JSON Repair tool?
The JSON Repair tool fixes broken JSON. This one also extracts JSON from chat text and validates the result against a schema. You can send the cleaned JSON to other tools such as the JSON Schema Validator.
Is my text sent anywhere?
No. Everything runs on your device. Nothing is sent, stored or put in the URL.
Privacy
This tool runs entirely in your browser. What you enter is processed on your device and is not sent to a server. The page does not write your input to local storage, cookies or the URL, and the tool does not send your input anywhere.