JSON tools

Format, validate and repair JSON and YAML, convert it to CSV, XML or SQL, and generate TypeScript, Go, Java, C# or Rust types. Nothing is uploaded.

Format, view & fix 6

Convert 10

Generate types & schemas 10

Config & data formats 10

Compare & query 2

LLM & AI 2

Which JSON tool to use

Most JSON work starts with one question: is this text valid, and what is in it? Paste it into the JSON Formatter. It indents the text, and when the JSON is broken it names the line and column of the first error instead of a vague “unexpected token”. If you only need a yes or no, plus warnings about duplicate keys and numbers that would lose precision, use the JSON Validator. For a large response from an API, the JSON Viewer shows a tree you can search, and copies the path of any node.

Text that is almost JSON is common: a config with comments, a log line with single quotes, or the answer of a chat model with a trailing comma and a sentence before it. JSON Repair fixes those cases, including output that was cut off mid-object, and returns formatted JSON. Files that use comments and trailing commas on purpose (JSONC, JSON5) go through JSON5 to JSON instead, which reads them by their own rules.

Converting to and from other formats

Each converter does one job and keeps the details that a generic converter tends to lose. JSON to CSV flattens nested objects into dotted column names and quotes the cells that need it; CSV to JSON detects the delimiter and keeps codes such as 007 as text. JSON to YAML quotes strings such as no or on that YAML 1.1 would read as booleans. When you are not sure which converter you need, the Data Format Converter takes any of JSON, YAML, TOML, XML or CSV and writes any other.

Generating types from a sample

Paste one real response and get types that match it: TypeScript, Go, Java, C#, Rust, Kotlin, Swift, Pydantic or Zod. A single sample only shows the fields it happens to contain, so paste an array with several items when you can. In the TypeScript output, for example, a field missing from some items becomes optional (estimate?: number), and a field holding different kinds of values becomes a union such as string | null. For validation rather than code, the JSON Schema Generator writes a schema from the same sample.

Comparing and querying

JSON Diff compares two documents by meaning, not by text: key order does not matter, and each change is reported with its path, or exported as an RFC 6902 JSON Patch. The JSONPath Tester runs a query as you type and shows what it matches, which is the quickest way to check an expression before you put it in code.

Numbers larger than JavaScript can hold

JavaScript stores every number as a 64-bit float, so an integer above 9,007,199,254,740,991 changes silently when a typical tool parses it. The tools here keep such numbers exactly, and the article on big JSON numbers explains where the problem comes from and how to handle it in your own code.

In-depth articles