Format compact JSON
Open JSON Formatter and paste this sample into JSON input. Set Indentation to 2 spaces and choose Format JSON.
{"jobId":42,"status":"queued","tags":["beta"]}
You should see an indented object with the same values. Choose Minify when you need compact JSON again.
Find and fix a syntax error
Paste the sample below into JSON Validator and choose Validate JSON. The error points near the closing brace, where the parser expects another property after the comma.
{"jobId":42,"status":"queued",}
Paste the same sample into JSON Repair and choose Propose repairs. Review the edit that removes the trailing comma, then choose Accept repair. Paste the repaired output back into the validator to confirm it reports Valid JSON syntax.
Compare two API responses
Open JSON Diff Checker. Paste the samples into Original JSON and Updated JSON, then choose Compare JSON.
Original JSON
{
"jobId": 42,
"status": "queued",
"attempts": 1
}
Updated JSON
{
"jobId": 42,
"status": "running",
"attempts": 2,
"worker": "worker-1"
}
The report shows three differences. The values of status and attempts change, and worker is added. Leave Ignore object key order checked when your comparison should focus on values.
Generate types and a schema
Paste this sample into JSON to TypeScript, set Root type name to JobResponse, and choose Generate TypeScript. The interface describes jobId as a number, status as a string, and tags as an array of strings.
{"jobId":42,"status":"queued","tags":["beta"]}
Paste the same sample into JSON Schema Generator and choose Generate schema. The schema describes jobId as an integer, status as a string, and each item in tags as a string.
Enable Mark observed properties as required only if your API guarantees every field in the sample. Before using either output, review optional fields and test against representative responses, including missing or null values where expected.