Quecko Logo

Free tool • Runs in your browser

JSON formatter

Pretty-print or minify JSON, with clear error messages for invalid input.

Loading tool...

Quick answer

Paste JSON and choose an indent to make it readable, or minify it to remove whitespace. Sorting keys makes two JSON documents easier to compare.

How to use it

  1. Paste your JSON.
  2. Choose an indent, minify or sort keys.
  3. Copy the output.

Example

Input
{"name":"Quecko","tools":63}
Output
{
  "name": "Quecko",
  "tools": 63
}

Common errors and how to fix them

Unexpected token
JSON needs double quotes and allows no trailing commas or comments.

Frequently asked questions

How do I format JSON online?

Paste your JSON here, choose an indent, and copy the formatted output.

How do I format JSON in VS Code?

Press Shift+Alt+F on Windows, Shift+Option+F on a Mac, or Ctrl+Shift+I on Linux in a .json file.

How do I format JSON in Notepad++?

Notepad++ needs a plugin such as JSTool or JSON Viewer. You can also paste the JSON here.

How do I format JSON in Sublime Text?

Install a package such as Pretty JSON, or paste your JSON here.

How do I format JSON in IntelliJ?

Open the file and use Reformat Code, with Ctrl+Alt+L on Windows or Cmd+Option+L on a Mac.

How do I format JSON in Visual Studio?

Open the file and use Edit, Advanced, Format Document.

What does formatted JSON look like?

Each key and value appears on its own line with consistent indentation, so that the nesting is easy to read.

How do I minify JSON?

Choose Minify, and all unnecessary whitespace is removed.

Does formatting change my data?

No, only whitespace, unless you sort keys. Extremely large numbers can lose precision, as in any JavaScript JSON parser.

Is what I paste uploaded?

No. Everything runs in your browser and nothing is sent to Quecko.

More developer tools

Need something built for your business?

Quecko designs and builds AI, Web3 and custom software products.

Start a Project