UtilityTools

JSON Formatter

Format, minify, and validate JSON in your browser with line errors and a tree view.

About this tool

About

This JSON formatter beautifies, minifies, and validates JSON in your browser. Paste messy API responses or config files, see clear line and column errors when something is wrong, and inspect nested objects in a collapsible tree—without uploading your data.

How it works

You type or paste JSON into the editor. After a short pause, the tool parses it with the built-in JSON parser. Valid input can be pretty-printed with 2 spaces, 4 spaces, or tabs, or compacted to a single line. A tree view shows the structure when parsing succeeds. Everything runs locally in this tab.

Steps

  1. Paste or type JSON into the editor (or click Sample to try an example).
  2. Check the status bar: Valid JSON, or Invalid with line and column. The error line is highlighted in the editor.
  3. Choose an indent style, then click Format to pretty-print, or Minify to compact.
  4. Use the tree view to expand and collapse objects and arrays.
  5. Copy or download the result as a .json file when you are done.

Frequently asked questions

Is this JSON formatter free?

Yes. It is free to use with no signup. Format, minify, validate, and download as much as you need.

Is my JSON uploaded to a server?

No. Parsing and formatting happen entirely in your browser. Your content is not sent to Utility Tools servers.

How do I find the error line?

When JSON is invalid, the status bar shows the error message plus line and column. That line is also highlighted in the editor gutter—click the line/column in the status bar to focus the editor.

What indent options are available?

You can pretty-print with 2 spaces (default), 4 spaces, or a tab character. Use Reset indent to return to 2 spaces.

Can I inspect nested JSON?

Yes. When the JSON is valid, the tree view lets you expand and collapse objects and arrays, including Expand all and Collapse all.

Privacy: Your JSON stays in this browser. Draft text and indent preference may be saved in local storage on this device. Nothing is sent to our servers.