Guides
Background that a tool page should not try to give you: what the format actually requires, why a conversion loses something, and what to do when a document will not parse. Each guide links to the tool that performs the job.
What is JSON?
JSON is a text format for structured data. It has six value types, one page of grammar, and a handful of rules that trip people up constantly.
5 sectionsHow to format JSON
Formatting re-prints a document with consistent indentation. The choices that matter are the indent width, whether to sort keys, and what happens to very large numbers.
5 sectionsHow to validate JSON
There are two different questions hiding behind "is this JSON valid": does it parse, and does it match the shape it is supposed to have.
5 sectionsCommon JSON syntax errors
Nearly every failed parse is one of a dozen mistakes. Here is each one, what the parser says about it, and the fix.
12 sectionsJSON vs YAML
YAML is a superset of JSON, which makes conversion in one direction lossless and in the other direction a decision about what to discard.
5 sectionsJSON vs XML
The two formats model different things. Converting between them is not a translation; it is a series of decisions, and every converter has to make them.
4 sectionsJSON vs CSV
CSV holds rows of text. JSON holds a typed tree. Every conversion between them either flattens something or invents something.
5 sectionsHow to convert JSON to CSV
The conversion itself takes a second. Getting a file that opens correctly and still means what the JSON meant takes four decisions.
6 sectionsHow to open a JSON file
A .json file is plain text. Anything that opens a text file will open it — the question is what makes it readable.
6 sectionsHow to compare two JSON files
A line-by-line diff of two JSON documents reports differences that are not differences. A structural diff compares values.
5 sectionsHow to handle large JSON files
The limit is rarely the file size. It is what loading it into memory as objects, and rendering it as DOM nodes, actually costs.
5 sectionsJSON data types explained
Six types, and about a dozen edge cases that cause almost all real-world bugs.
7 sectionsJSON escape characters
Eight escape sequences plus \uXXXX. Everything else after a backslash is a syntax error.
7 sections