Beautify and validate JSON, find the exact line of an error, and convert JavaScript object literals into strict JSON.
About the JSON Toolkit
Formats, validates and beautifies JSON. It also accepts JavaScript object notation (unquoted keys), can stringify the result, and lets you choose 2, 4 or 8 spaces of indentation.
How to use it
Paste JSON or upload a .json file. It is validated as you type.
Choose an indent of 2, 4 or 8 spaces and click Beautify.
To turn a JavaScript object with unquoted keys or single quotes into strict JSON, use Stringify.
Copy or download the formatted JSON.
Good for
Making a minified API response readable
Finding the exact spot where invalid JSON breaks
Converting a JavaScript object literal into strict JSON
Tip: The most common JSON errors are trailing commas, single quotes instead of double quotes, and unquoted keys. The validator points to the line so you can fix it quickly.
Frequently asked questions
Why is my JSON invalid?
The most common causes are trailing commas, single quotes instead of double quotes, and unquoted keys. The error message shows where parsing failed.
Can it convert a JavaScript object to JSON?
Yes. Paste an object literal such as {name: 'Ana', tags: [1, 2,]} and click Stringify. The input is parsed as data and never executed.
Is my JSON uploaded anywhere?
No. Formatting and validation happen in your browser.