jfmt.dev

JSON Repair

Paste almost-JSON — trailing commas, comments, unquoted keys — and get valid JSON back. Useful for logs, LLM output, and copy-paste from JS.

input.json

JSON formatter

Input0 B
Output · preview.json
{ }

Run a tool to see a polished result here

Live syncReady · processed locally in your browser
Local-only processing: your JSON never leaves this browser tab.

What this repair pass can fix

Typical issues: trailing commas, // and /* */ comments, single-quoted strings, and unquoted keys. If the text is too far from JSON, you still get a clear error. All processing stays on this device.

Sample input on this page

The editor is prefilled with a small example for JSON Repair. Repair turns almost-JSON (trailing commas, comments, single quotes, unquoted keys) into parseable JSON when the text is close enough. Replace it with your own file; the sample and your payload stay in this tab.

{
  // trailing comma + comment
  name: 'jfmt',
  tags: ['json', 'local',],
}

How to use this tool

  1. Paste JSON into the JSON Repair editor. The file stays in this browser tab and is not uploaded to jfmt.dev.
  2. Click Run. Repair turns almost-JSON (trailing commas, comments, single quotes, unquoted keys) into parseable JSON when the text is close enough.
  3. Copy the output, or continue with a related tool below. Related tools on this site include beautify, validate, minify, JSON to CSV, JSON to YAML and JSON to XML — all local.
  4. JFmt runs in a Web Worker in this tab. Do not paste production secrets if you share your screen.

When this page is the right choice

This dedicated JSON Repair URL matches that search intent; the homepage stays the general formatter. Repair turns almost-JSON (trailing commas, comments, single quotes, unquoted keys) into parseable JSON when the text is close enough. Related tools on this site include beautify, validate, minify, JSON to CSV, JSON to YAML and JSON to XML — all local. JFmt runs in a Web Worker in this tab. Do not paste production secrets if you share your screen. Read errors in the output pane instead of sending production payloads to another service.

FAQ

Can it fix any broken file?

No. It targets common “almost JSON” mistakes. Completely truncated or binary data still fails.

Does repair guess missing values?

It applies conservative fixes. It will not invent business data that was never there.

Is my broken JSON uploaded?

No. Repair runs in the browser like every other JFmt tool.

Does this tool upload my file?

No. Parsing and conversion run in a Web Worker in this tab. jfmt.dev does not receive the payload.

Why is there a separate URL from the homepage?

So people searching for this operation land on a page that already selects it. Repair turns almost-JSON (trailing commas, comments, single quotes, unquoted keys) into parseable JSON when the text is close enough.