JSON Formatter
Online JSON formatter with custom indentation and instant preview. 100% local, no login required.
A whole API response on one line is hard to read. This tool expands JSON into indented multiline text, or compresses it back to a single line, for debugging and for committing.
Features
Format and compress
Expand a minified response into indented lines, or compress it to one line for logs and committed data.
Adjustable indentation
Set the indent width to suit how densely you like to read.
Instant validation and preview
Invalid input is flagged immediately; valid input is shown on the right as you go.
Local processing
Nothing is uploaded. Copy the result and go.
Use Cases
Debugging API responses
Expand a large response before hunting for a field, instead of scrolling a console.
Minifying before commit
Squeeze JSON to one line for config files and test fixtures.
Finding fields in deep JSON
Indentation makes the nesting structure visible at a glance.
How It Works
- 1Paste JSONAn API response, a log snippet or a config file.
- 2Set the indentAdjust the width to taste.
- 3FormatThe result appears on the right.
- 4CopyCopy it wherever you need it.
FAQ
What most often causes "not valid JSON"?
Three things: single quotes instead of double quotes, a trailing comma, or JavaScript object literal syntax such as unquoted keys and special values rather than strict JSON.
Does it support JSON5 or JSONC?
No. Parsing is strict JSON. Comments, single quotes and trailing commas will fail, so remove them first.
Is my data uploaded?
No. Parsing and formatting run in your browser, and the page sends nothing.
Related Tools
Table to Markdown
Paste HTML table source, or whatever Excel copies to the clipboard; the converted table appears below before you paste it anywhere.
HTML to Markdown
Paste HTML source, or enter a URL to have it fetched; on complex pages add an XPath to extract just the article body, and the rule is remembered per domain.