JSON Formatter

Paste JSON and format it with the indentation you prefer, optionally sorting object keys alphabetically.

  • Runs in your browser
  • Free to use
ctrl + enter

About this tool

APIs return JSON on one line, logs embed it, and reading it means formatting it first. The JSON Formatter parses the document and pretty-prints it with the indentation you choose, 2, 3 or 4 spaces or tabs, with an option to sort keys so two documents can be compared side by side. It runs in your browser, so pasting production payloads is safe.

Related: JSON Validator, JSON Minify and JSON Beautify.


How to use it — quick steps

  1. 01

    Enter the json

    Type or paste the json in the field above. Nothing is uploaded: the text stays in your browser.

  2. 02

    Adjust the options

    Pick the settings that fit your case; the defaults work for most people. Changes apply instantly.

  3. 03

    Press "Format JSON"

    Press "Format JSON" or Ctrl + Enter. The result appears instantly below the form. Results can be copied.


Key features of this tool

  • Nothing leaves your browser

    The processing is plain JavaScript that runs on your device: the text you paste is never uploaded to our servers or to anyone else.

  • Instant results

    Results appear the moment you press the button, even for long inputs, and every block has copy and download actions.

  • Works everywhere

    No installation, no account and no limits: the tool works on desktop and mobile, in any modern browser, as often as you like.


Frequently asked questions

Does formatting change the data?

No. Only whitespace is added; values and key order stay the same unless you tick the sort option, which reorders object keys alphabetically at every level.

What if my JSON is invalid?

The formatter stops and tells you; paste it into the JSON Validator to see the exact position of the error.

How do I get the compact form back?

Use JSON Minify, which removes all whitespace.

Are my files or data uploaded?

No. The tool is plain JavaScript that runs in your browser; the files or data you provide here are never uploaded to our servers.


Popular tools


From APIVoid, the team behind IPVoid

Enhance your threat detection capabilities

APIVoid provides threat intelligence APIs to automate security workflows, with simple pricing and a 30-day free trial to start, no card required.

What you get with APIVoid

  • IP reputation and blacklist checks
  • Domain and URL reputation scoring
  • DNS lookups and propagation
  • SSL certificate and TLS details
  • Website screenshots and page info
  • Email address verification
  • 30+ cybersecurity APIs
30-day free trial