JSON Formatter
PopularPretty-print JSON locally.
Loading…
About JSON Formatter
API responses and config files often arrive as one long line, and a missing comma inside is hard to spot. Paste the JSON or load a .json or .txt file, choose how many spaces to indent with, and press Format / Beautify. Numbers are kept exactly as written, so 12345678901234567890 and 1.10 survive untouched, and repeated keys stay in place while a warning lists them. Minify and conversion sit on the same page.
Features
- Indents with one, two or four spaces
- Keeps number text, key order and repeated keys exactly as written
- Lists repeated key names in a warning
- Plain-language syntax errors, with the failing position when the browser reports it
- Converts to CSV, TSV, XML or YAML from the same page
- Loads .json and .txt files from disk
Limitations
- Input is capped at 500,000 characters.
- Only strict JSON is accepted: comments, single quotes, trailing commas and unquoted keys are reported as errors.
- CSV and TSV conversion needs a non-empty array of objects at the root.
- Downloading the result needs a free account; copying it does not.
How it works
- Paste JSON into the Input panel, or choose Upload Data to load a .json or .txt file.
- Pick one, two or four spaces from the indentation menu.
- Select Format / Beautify to indent the document, or Minify / Compact to remove the whitespace instead.
- Select Validate if you only want to know whether the text parses and what the root type is.
- To change format, choose JSON to CSV, XML, YAML or TSV in the menu and select Convert.
- Copy the output, or use Download to save it as a file.
Example input
{"name":"Auro","tools":["token-counter","json-formatter"]}Frequently asked questions
- Only the layout changes. Number text, key order and repeated keys are kept as you wrote them. Strings are written back through the standard JSON encoder, so an escape such as \u00e9 comes out as the letter itself, which is the same value.
- Both entries stay in the formatted output in their original order, and a notice names up to five of the repeated keys. Most parsers keep only the last value, so decide which one you meant before using the document.
- The text is not valid JSON, so there is nothing to indent. The message gives the character position where parsing stopped, plus line and column, when your browser reports them; otherwise it suggests checking commas, quotes and brackets.
- No. Parsing, indenting and conversion all happen in the page, and a file chosen with Upload Data is read by your browser, not sent anywhere. The only step tied to an account is saving the output with Download.
Related tools
Related guides
- React vs. VueTwo component-based UI libraries with different philosophies on structure.
- FastAPI vs. DjangoA modern async-first framework vs. Python's most complete, batteries-included web framework.
- Laravel vs. ExpressA batteries-included PHP framework vs. a minimal Node.js routing library.
- JSON Formatter vs. JSON ValidatorMaking JSON readable vs. confirming JSON is syntactically correct.
