Validate & Format · Runs in your browser

JSON Formatter

Beautify messy or minified JSON into clean, readable, consistently indented code — with 2 spaces, 4 spaces or tabs.

Paste, drop or type your JSON

It’s checked as you type — nothing is uploaded.

Ctrl + V to paste · drop a .json file anywhere here

Drop your JSON file to load it
Waiting for input1 line0 B

Ctrl Enter ValidateCtrl Shift F FormatCtrl Shift M MinifyCtrl Z Undo

How to use it

  1. Paste minified or messy JSON into the editor, or upload a .json file.
  2. Pick an indent size and click “Format” (or press Ctrl + Shift + F).
  3. Copy the result or download it as a .json file. Ctrl + Z undoes the formatting.

Indentation

Choose 2 spaces, 4 spaces or tabs. Changing the setting re-formats valid JSON immediately, and your choice is remembered.

Sort keys

“Sort keys” orders every object’s keys alphabetically, at all levels — handy for stable diffs and reviews.

Folding

Click the arrows in the gutter to fold objects and arrays you don’t need to see.