JSON Formatter
Turn minified JSON into something you can read.
Paste a single-line API response and get properly indented, readable JSON back. Jsonviewpro validates the input first, so if something is wrong you get the line, the column and a plain-English explanation instead of a cryptic parser message.
Array order is always preserved — only whitespace, and optionally key order, change.
Input JSON
Formatted JSON
What does formatting JSON do?
Formatting — also called pretty-printing or beautifying — adds line breaks and indentation so the structure of a document becomes visible. It does not change the data: the same keys, values, order and types come out the other side.
Because whitespace between tokens is insignificant in JSON, formatted and minified documents are interchangeable for any parser. The difference is purely for humans.
How to format JSON
- Paste your JSON, drop a file on the editor, or press Upload.
- Choose an indentation style: 2 spaces, 4 spaces, 8 spaces or tabs.
- Press Format JSON, or use the keyboard shortcut Cmd/Ctrl + Enter.
- Copy the result, or download it as a .json file.
Which indentation should I use?
Two spaces is the most common convention for JSON and is what most linters and editors default to. Four spaces reads well for shallow configuration files. Tabs are worth choosing when the file will be edited by people with different accessibility needs, since tab width is a reader preference.
If you are committing the file to a repository, match whatever your project already uses — a formatter change that rewrites every line makes diffs unreadable.
Sorting keys
Optionally sort object keys alphabetically while formatting. This makes two versions of the same document far easier to compare by eye, and produces a canonical form for checksums. Array order is always preserved, because reordering array items would change the meaning of the document.
Why is my JSON invalid?
The most common causes are a trailing comma before a closing bracket, single quotes instead of double quotes, unquoted property names, comments (JSON has none), and JavaScript or Python literals such as undefined, NaN, True or None.
Jsonviewpro names the specific problem, points at the line and column, and — where the fix is unambiguous — offers a one-click repair that shows you exactly what it changed.
Frequently asked questions
Does formatting change my data?
Can I format invalid JSON?
Is there a keyboard shortcut?
Does the formatter preserve key order?
Related JSON tools
- JSON BeautifierClean up JSON with configurable indentation and key sorting.
- JSON MinifierStrip whitespace and see exactly how many bytes you saved.
- JSON ValidatorCheck syntax with precise line, column and cause.
- JSON ViewerExplore JSON as a collapsible tree with search and copyable paths.
- JSON to YAMLConvert JSON into readable YAML.