JSON Formatter

Pretty-print or minify JSON, sort keys, and find errors with the exact line and column.

FreeNo sign-upPrivate — runs in your browser
—Keys
—Max depth
—Result size

How to use the JSON Formatter

  1. Paste your JSONPaste it into the input box, or press Sample to try it.
  2. Format or minifyChoose indentation and whether to sort keys alphabetically.
  3. Copy or downloadCopy the result or save it as a .json file.

Example

Input: {"name":"Ada","langs":["en","fr"]}

Formatted with 2 spaces: { "name": "Ada", "langs": [ "en", "fr" ] } on separate lines

Frequently asked questions

Is my JSON sent to a server?

No. Formatting happens entirely in your browser, so it is safe to use with private data such as API responses.

Why does it say my JSON is invalid?

Common causes are trailing commas, single quotes instead of double quotes, comments, or unquoted keys. The error shows the line and column so you can fix it.

What does “Sort keys” do?

It orders object keys alphabetically at every level. This makes it easier to compare two JSON files or keep config files tidy.

Popular posts from this blog

Character Counter

Speech to Text Online

Keyboard Tester