Paste JSON to format, validate syntax, and explore structure with an interactive tree view.
Paste your JSON
Drop raw, minified, or malformed JSON into the left panel. You can also click paste to pull directly from your clipboard.
Format or validate
Click format to instantly beautify the JSON with consistent indentation. Syntax errors are flagged inline with the exact line and column.
Inspect and copy
Switch to tree view to navigate nested objects and arrays. Copy the formatted output or adjust indent size and key sorting in the settings panel.
Instant validation
Real-time syntax checking catches missing commas, unquoted keys, trailing commas, and type mismatches as you type.
Syntax highlighting
Keys, strings, numbers, booleans, and null values are colour-coded so the structure is readable at a glance.
Interactive tree view
Collapse and expand any node. Useful for exploring deeply nested API responses without losing context.
Key sorting
Alphabetically sort all object keys at every depth level — useful for diffing two JSON objects that have the same data in different order.
Configurable indent
Choose 1, 2, or 4 space indentation to match your project's code style or editor settings.
Zero server calls
All processing runs in your browser. Your JSON data never leaves your machine.
These six errors account for the vast majority of invalid JSON we see. Each example below shows the broken input, the corrected version, and why the rule exists.
JSON is defined by RFC 8259. These are the rules that determine whether a document is valid. The "why" column explains the non-obvious ones.
A JSON formatter takes raw or minified JSON text and rewrites it with consistent indentation and line breaks so it is easier to read and debug. It also validates the syntax against the JSON specification (RFC 8259) and reports any errors.
Yes. The tool is completely free to use with no account, no rate limits, and no data sent to a server. All formatting and validation runs locally in your browser.
Formatting changes the whitespace — it makes JSON human-readable without changing the data. Validating checks whether the JSON is syntactically correct per the JSON specification. This tool does both simultaneously.
Set the indent size to 1 in the settings panel. The output will use minimal whitespace, reducing payload size for API responses and storage.
The most common causes are: a trailing comma after the last property, single-quoted strings instead of double-quoted, unquoted object keys, JavaScript comments, or a missing closing bracket. The error bar shows the exact character position.
Tree view renders JSON as a collapsible node hierarchy instead of raw text. Each object and array is expandable, making it easy to navigate large or deeply nested structures like API responses without scrolling through thousands of lines.
No. The JSON specification defines objects as unordered collections, so key order carries no semantic meaning. Sorting alphabetically is cosmetic — it makes it easier to compare two objects or locate a specific property.
Yes. The tool runs entirely in your browser using the native JSON.parse API. No data is transmitted to any server, logged, or stored. You can verify this by opening your browser's network tab while using the tool.