Skip to content
TabKiwiTabKiwi

JSON Formatter

Pretty-print or minify JSON with 2 spaces, 4 spaces or tabs, and optionally sort keys alphabetically.

DataRuns in your browser. Your files never leave this device.
Loading tool…

About this tool

Turn a one-line API response into readable, indented JSON, or squeeze a pretty file back down to a single line before shipping it. You choose the indentation and can sort every object's keys so two documents line up for comparison. If the input has a syntax error, the tool points to the exact line and column instead of failing silently. Everything runs in your browser, so private payloads never leave your machine.

How to use JSON Formatter

  1. Paste JSON into the left box, or open a .json file.
  2. Pick 2 spaces, 4 spaces, tabs or Minify.
  3. Tick “Sort keys A–Z” if you want a stable key order.
  4. Copy the result or download it as a file.

Frequently asked questions

Does formatting change my data?

No. Only whitespace changes. Sorting keys reorders object properties, which JSON treats as unordered anyway; array order is always kept.

How big a file can it handle?

Documents of several megabytes format in well under a second on a typical laptop, because parsing uses the browser's native JSON engine.

Why does it say my JSON is invalid?

Common causes are trailing commas, single quotes, comments or unquoted keys. The error message shows the line, column and a likely fix.

More Data tools

View all 25 →