JSON Formatter and Repair Tool
Paste minified or broken JSON to indent it for reading, squeeze it onto one line, or fix common mistakes automatically. If something is wrong, you see the exact line and column.
Your data never leaves your computer: everything runs in your browser.
How to use it
- Paste your JSON into the box or choose a .json file.
- Press Format to indent it with 2 spaces, 4 spaces or tabs. Press Minify for a single line.
- Errors are shown with their line and column. Repair fixes common mistakes such as trailing commas, single quotes, unquoted keys and missing brackets.
- Copy the result or download it as a .json file.
Example
Broken JSON copied from a script: unquoted keys, single quotes and a trailing comma. After Repair:
Input
{name: 'Jane', city: 'Boston', tags: ['new', 'vip',],}Output
{
"name": "Jane",
"city": "Boston",
"tags": [
"new",
"vip"
]
}Need more?
Run ForLab Formatter on Apify to do the same conversions every day, automated and validated.
- Call it from the API or on a schedule: files convert inside your workflow, not by hand.
- In: CSV/TSV, Excel, JSON, NDJSON, XML, YAML and HTML tables; merge up to 10 files or Apify datasets.
- Clean in the same run: dedupe, filter, sort, flatten nested JSON, select and rename columns, repair broken JSON; Turkish encodings and ; delimiters are detected.
- Out: JSON, CSV, Excel, SQL INSERT, Markdown, HTML and JSON Schema; every row is validated against one example object.
- Pay only for valid rows: $0.0001 each (1,000 rows ≈ $0.10), plus $0.001 per run.
Frequently asked questions
What does a JSON formatter do?
It turns minified or messy JSON into indented, readable text, so nested fields, missing values and errors are easy to spot. Minify does the opposite: it strips whitespace to put the data on one line.
Is my data sent to a server?
No. Formatting, minifying and repairing all run in your browser; the JSON you paste never goes to a server. JSON with customer data or API keys is safe to use here.
Which errors does Repair fix?
Trailing commas, single quotes, unquoted keys, missing closing brackets, comments, and Python values such as None, True and False. Give the repaired result a quick look anyway.
How large a JSON file can it handle?
JSON of a few megabytes is processed comfortably in the browser. When the output is very long, only the first part is shown on screen; Copy and Download always give you all of it.
Can I convert JSON to CSV or Excel?
Yes, with our JSON to CSV and Excel converter. If you do it regularly, Formatter on Apify runs the conversion through an API and validates every row.