JSON formatter, validator and converter

Paste a payload to see why it will not parse, pretty-print or minify it, compare it with another version by path, and turn it into TypeScript types, CSV or YAML. Your JSON never leaves this tab.

Sign in to save this tool

Paste JSON, or open a .json file. It stays in this tab.

or drop it here

Valid JSON · 24 values, 4 levels deep

⁨448 B⁩Size
17Distinct keys
5Objects
1Arrays
4Depth
Output
Indentation
{
  "order": {
    "id": 4821,
    "status": "shipped",
    "total": 249.9,
    "currency": "SAR"
  },
  "customer": {
    "name": "ريم الحلبي",
    "email": "reem@example.com",
    "vip": true
  },
  "items": [
    {
      "sku": "KB-01",
      "title": "لوحة مفاتيح ميكانيكية",
      "qty": 1,
      "price": 199.9
    },
    {
      "sku": "MS-04",
      "title": "فأرة لاسلكية",
      "qty": 2,
      "price": 25,
      "gift": true
    }
  ],
  "shippedAt": "2026-09-18T09:12:00Z",
  "note": null
}

How to use it

  1. Paste your JSON or open a .json file. It is checked as you type.
  2. If it is invalid, read the message: it names the problem (for example a trailing comma or single quotes) and shows the line and column with a caret under the spot.
  3. Pick an output: formatted, minified, sorted keys, TypeScript, CSV, YAML or an escaped string, then copy or download it.
  4. To compare two versions, choose Compare and paste the second document. Differences are listed by path, so reordered keys do not count as changes.

Supported formats and limits

  • Documents up to 5 MB (about 5 million characters) and files up to 5 MB. Larger input is not parsed.
  • Nesting deeper than 1,000 levels is refused.
  • The output preview shows the first 200,000 characters and the comparison shows the first 1,000 differences; copy and download always give the full result.
  • Strict JSON only: comments, single quotes, trailing commas and unquoted keys are reported as errors, not fixed silently.
  • Arrays are compared index by index, so an item inserted at the start shows as changes to every later index.
  • CSV flattens nested objects into dotted columns; a nested array becomes one cell of JSON.

Examples

  • Find the stray comma that makes an API response fail to parse.
  • Generate TypeScript interfaces from a sample response, with optional keys where some items lack them.
  • Turn an array of orders into a CSV file for a spreadsheet (use the semicolon delimiter for Excel in Arabic or European locales).
  • Compare a config file before and after a deploy to see exactly which values changed.

Frequently asked questions

Why does my JSON not parse?

The usual causes are a trailing comma, single quotes instead of double quotes, an unescaped quote inside a string, or a raw line break inside a string. The tool names the problem and shows its line and column.

Is my data uploaded?

No. Parsing, converting and comparing all run in your browser. Nothing you paste or open is sent to a server.

How are TypeScript types generated?

Objects inside the same array are merged into one interface: a key missing from some items becomes optional, and a key whose type varies becomes a union.

Why compare by path instead of by line?

A line diff of formatted JSON counts a reordered key or a re-indented block as many changes. Comparing by path lists one line per value that actually differs, with the path to reach it in code.