Candid Tools

JSON Formatter

JSON Formatter prettifies JSON in your browser and repairs broken input first - Python dicts, single quotes, trailing commas, comments, missing quotes and brackets.

At a glance

Accepts
JSON, Python dicts, AWS CLI and boto3 output, NDJSON, or JSON with comments
Outputs
Indented valid JSON you copy or save as formatted.json, plus a list of what was repaired
Where it runs
Entirely in your browser, on your device
What leaves your device
Nothing - what you type stays in this tab
Limits
No size or count cap; bounded by your device's memory
Account
Not required - there is no sign-up
Price
Free, with no watermark and no usage cap
Made by
Visrut
Last updated
8 October 2026

JSON Formatter prettifies JSON so it's actually readable - paste a blob, pick your indentation, and format it. If what you paste isn't valid JSON, it gets repaired first: Python dicts, single quotes, unquoted keys and values, trailing commas, comments, curly quotes, missing commas and unclosed brackets are all handled, and several objects pasted back to back become one array. Repairs are applied by a scanner that tracks whether it's inside a string, so structure is fixed while your actual values are left alone - and anything that did change is listed above the box rather than applied silently. It all runs in your browser; nothing you paste is sent anywhere.

How to use it

  1. Paste your JSON - or a Python dict, AWS output, or something slightly broken - into the text box.
  2. Choose 2 or 4 spaces for indentation.
  3. Click "Format" to prettify it.
  4. Copy it to your clipboard or download it as a .json file.

Frequently asked questions

Is my JSON uploaded anywhere?

No - formatting runs entirely in your browser with JSON.parse and JSON.stringify. Nothing you paste is sent to a server.

Does it only work with valid JSON?

No. If the input isn't valid JSON it gets repaired first: single quotes become double quotes, Python's True/False/None become true/false/null, unquoted keys and unquoted text values get quoted, trailing commas and // or /* */ comments are removed, curly quotes become straight ones, missing commas and missing closing brackets are added, and NaN/Infinity become null.

Can I paste output from the AWS CLI or boto3?

Yes. AWS CLI output is already valid JSON, so it formats as-is. Printed boto3 responses are Python dicts, which get converted - including datetime.datetime(...) values, which are kept as strings, and Decimal('1.5'), which becomes the number 1.5. Multiple objects pasted back to back (NDJSON, like a DynamoDB export) are combined into a single array.

Will repairing change my actual data?

No. Repairs only ever touch structure, never the text inside a string. A value like 'True story' keeps its capital T, and runs of spaces inside a string are preserved. Input that's already valid JSON is never rewritten at all. Whatever did get changed is listed above the text box after you hit Format, so nothing is corrected silently.

Can I choose the indentation?

Yes - pick 2 or 4 spaces from the dropdown before you click Format.

What happens if my input can't be repaired?

A message appears above the text box explaining what to check, and your original text stays exactly where it is - nothing is overwritten or lost.

Can I save the formatted output?

Yes - the download button saves it as a .json file, and the copy button copies it straight to your clipboard.

Does formatting overwrite what I pasted?

Yes - once parsing succeeds, the Format button replaces the text box contents with the prettified version. Copy or download first if you need the original back.