Skip to content

JSON Formatter

Popular

Pretty-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

  1. Paste JSON into the Input panel, or choose Upload Data to load a .json or .txt file.
  2. Pick one, two or four spaces from the indentation menu.
  3. Select Format / Beautify to indent the document, or Minify / Compact to remove the whitespace instead.
  4. Select Validate if you only want to know whether the text parses and what the root type is.
  5. To change format, choose JSON to CSV, XML, YAML or TSV in the menu and select Convert.
  6. Copy the output, or use Download to save it as a file.

Example input

{"name":"Auro","tools":["token-counter","json-formatter"]}

Frequently asked questions