What Is JSON? A Plain-English Guide to Reading and Formatting It
Understand JSON objects, arrays and common syntax errors, and learn how to format, validate and convert JSON quickly.
JSON in one minute
JSON (JavaScript Object Notation) is the most common way apps and websites send data to each other. It is plain text made of objects in curly braces {} with "key": value pairs, and arrays in square brackets [] holding lists of values.
Values can be text in double quotes, numbers, true, false, null, or other objects and arrays.
The errors that break JSON
Most invalid JSON comes from a handful of mistakes: a trailing comma after the last item, single quotes instead of double quotes, keys without quotes, comments (JSON does not allow them) and a missing closing bracket.
Paste the text into the JSON formatter: valid JSON becomes neatly indented, and invalid JSON is flagged so you know to look for one of these mistakes.
Format for reading, minify for shipping
Indented JSON is easier for people to read and review. Minified JSON removes every unnecessary space, which makes files and API responses smaller. The formatter does both.
Turning JSON into something else
Working in TypeScript? Paste a sample response into JSON to TypeScript to get matching interfaces. Need the data in a spreadsheet? JSON to CSV turns an array of objects into rows and columns, and CSV to JSON goes the other way.