Skip to content
Input
1 lines · 304 chars
Valid
25 lines · 419 BValid

Format, validate, beautify and minify JSON quickly — free, private and running entirely in your browser

Format, validate, minify, repair, and convert one JSON document. The sample is a minified TheToolSera site record with stats, categories, and featured tools. Everything runs in the browser. The page makes no network request. Only the text is kept for the session.

Last updated: 11 October 2026

About

Format writes the indented text back into the input. Minified and Resolved change only the output. Resolved does not rewrite the input. Sort keys sorts objects and leaves arrays in their order. It starts off. There is no separate Validate button. A status chip shows Empty, Valid, Valid with a nested count, Invalid, or Too large.

For someone reading one JSON document, fixing a payload that will not parse, or saving it as JSON, XML, CSV, or YAML.

Use it on a whole document. It does not check a JSON Schema, and the tree search is not a JSONPath box. The path you can copy starts at $.

Features

  • Input and output. Indent is 2, 3, 4, or 8 spaces, or Tab. The default is 2. Output versions are Formatted, Minified, and Resolved. Tabs are Code, Tree, and Stats. Convert is JSON, JSON to XML, JSON to CSV, or JSON to YAML. Analysis follows typing after a pause: 180 ms, then 280 ms above 262,144 characters, 400 ms above 1,048,576, and 600 ms above 4,194,304.
  • Tree, stats, and files. The tree has search, depth levels L1, L2, and L3, Collapse all, Expand all, and Copy path. Stats count objects, arrays, strings, numbers, booleans, and nulls, plus max depth, total keys, JSON size, and formatted size in UTF-8 bytes. Upload accepts .json, .txt, and .jsonl. Copy and Download stay disabled when there is nothing to export, including invalid JSON. The download name is the loaded file’s name, or formatted, plus the Convert extension.
  • Repair. The error row shows the parser message, Ln and Col, and a caret snippet under Details. Repair uses jsonrepair 3.15.0 and writes the result into the input at the selected indent. Before you click, the row says “Repair accepts up to 1.5 MB of UTF-8.” Over that limit it says “This document is over the 1.5 MB UTF-8 repair limit.” and the button stays disabled.

How to use

  1. Paste into the input, drop a file, upload one, or use Try sample.
  2. Read the status chip. If it says Invalid, open Details for the line, column, caret, and the diagnosis titles.
  3. Press Format to write the indent back into the input, or switch the output to Minified or Resolved.
  4. Copy or Download when the output is not empty. Undo and Redo step through the input history.

Example

{'id': 42, 'status': 'ok', 'items': [{'sku': 'A-1', 'qty': 2},],}
{
  "id": 42,
  "status": "ok",
  "items": [
    {
      "sku": "A-1",
      "qty": 2
    }
  ]
}

The parser message is Expected property name or '}' at Ln 1, Col 2. The diagnoses are Trailing comma, Single-quoted keys, and Single-quoted values. Repair at 2 spaces is the object above. Minified is {"id":42,"status":"ok","items":[{"sku":"A-1","qty":2}]}. A separate repair of {name: 'Ada', } diagnoses Trailing comma, Single-quoted values, and Unquoted keys, and prints {"name": "Ada"} at 2 spaces. The sample arrives minified on one line. Format writes it back as the 25-line TheToolSera record at 2 spaces.

Common problems and fixes

  • The chip says Invalid. The row shows the parser message and Ln, Col. Details adds the caret and any diagnosis titles from the list above. Repair is on that row. A document over 1.5 MB of UTF-8 says so, and Repair stays off.
  • Minified did not change the input. Minified and Resolved change the output only. Format is the action that writes the indented text back into the input.

FAQ

What does the sample become?

The input starts minified on one line. At 2 spaces it is the 25-line TheToolSera record with eight top-level fields: site, version, isActive, launchedOn, stats, categories, featuredTools, and analytics. Minified output is that same record on one line. The input stays as it is until you press Format.

Which problems are diagnosed, and what does Repair do?

The titles are trailing comma, single-quoted keys, single-quoted values, unquoted keys, missing comma, comments, Python True / False / None, smart quotes, invalid escape, NaN / Infinity / undefined, missing or extra brackets, an unterminated string, and text before or after the JSON. Repair does not tick those one by one. It runs jsonrepair 3.15.0 and pretty-prints the result. {name: 'Ada', } becomes a 2-space object whose only field is "name": "Ada". Duplicate keys are a separate warning, not one of those titles.

What are the limits?

No JSON Schema check. No JSONPath query box; the tree path starts at $ and you can search the tree. Not a streaming parser. Resolved does not rewrite the input. Above 12,582,912 characters, live analysis pauses. Upload accepts .json, .txt, and .jsonl up to 12 MB. A very large document still depends on the browser. Repair makes guesses, so check the result.

Is my data uploaded or stored?

Nothing is uploaded. Processing runs in your browser. Your input may be kept in this tab for the session (up to 524,288 characters) and is cleared when you close the tab. Longer input is not kept.

What do the shortcuts and the download do?

Clear is a toolbar button. Ctrl/Cmd+Enter formats. Ctrl/Cmd+Shift+Enter resolves. Ctrl/Cmd+Shift+C copies the output. Undo and Redo keep up to 80 entries or 8,388,608 characters. Download uses the file name, or formatted, and the extension json, xml, csv, or yaml for the Convert target. Copy and Download are disabled when the output is empty.

Guides and glossary

Learn and reference material connected to JSON Formatter.

Task guides and comparisons

Task-specific pages and comparisons for JSON Formatter.