← utilities

JSON Formatter

Format, validate, and minify JSON instantly in your browser.

Output
Pretty-print or minify to see output
Tree view

Paste JSON, then pretty-print or minify.

100% Client-Side Processing

What JSON Formatter is

You paste a payload into Input, or tap Sample for a tiny valid object. Indent is 2 spaces, 4 spaces, or Tab. Pretty-print writes a readable tree. Minify writes one line. Paste, Sample, and Clear sit on the input pane. On a narrow screen, Input and Output are tabs so the editor does not fight the result.

When parse fails, a banner names the line that broke. Gutters show line numbers on both panes. Copy and Download sit under the split. Tree view is a details block that appears only when the JSON is valid. You open it yourself. Huge files skip live highlighting so the tab stays usable. The highlight preview truncates at 8,000 characters. The tree render stops at 400 nodes. Live highlighting cuts out after 120,000 characters. Pretty-print and minify stay available; the skip is only for colour in the editor.

How to use it

  1. Paste the payload, or tap Sample. Watch the gutter as lines grow.
  2. Pick 2 spaces, 4 spaces, or Tab before you format.
  3. If the error banner appears, fix that line, then pretty-print or minify.
  4. Copy or download the output. Open Tree view if you want a nested walk.
  5. On a phone, switch to the Output tab to read the result.

Common uses

Clean a config before you commit it. Minify a blob for a one-line fixture. Find the missing comma in an API sample you were sent. Walk a nested object in Tree view without opening an IDE. Format a dump so a teammate can read it in chat. Check that a hand-edited settings file still parses. Turn a minified log line back into something you can scan. Keep a pretty copy next to a minified copy when you are writing a test. The page does not fetch schemas and does not talk to an API. It only formats what you put in the box. If two versions of the same file both look valid, you still need a compare tool to see what changed between them.

Privacy

The payload is never uploaded. We do not keep a history. Close the tab or refresh and the text is gone. Nothing is saved on this device unless you copy or download it yourself.