JSON Formatter

Format, validate and minify JSON in your browser. Free JSON formatter with tree view, key sorting and exact error positions.
JSON input
Formatting options
Result

Paste JSON on the left, then choose Format JSON to pretty-print it, Minify to squeeze it onto one line, or Validate to check it without touching the input.

Ctrl+Enter formats from the input editor
Tool Introduction

Paste API responses, config files, browser storage exports, webhook payloads, or log snippets and format them into readable JSON. The validator points to the line and column that failed, while the repair action fixes common issues such as trailing commas, comments, single-quoted strings, and unquoted object keys before formatting.

Choose two-space, four-space, or tab indentation, sort object keys before comparing payloads, wrap long lines while reviewing, and switch to the tree view to inspect nested data. Selecting a tree row exposes its JSON path and lets you copy either the path or the value for tickets, API docs, tests, or debugging notes. Everything runs locally in your browser.