A free JSON repair workshop for developers

fixjson.dev is a free browser-based workshop for repairing malformed JSON. Developers paste broken payloads from LLMs, APIs, log files, and configuration snippets every day. Strict JSON parsers reject those payloads for predictable reasons: trailing commas, single quotes, unquoted keys, Python-style True/False/None, JavaScript comments, smart quotes, markdown fences, and truncated objects.

Unlike a validator that only reports the first syntax error, this tool attempts targeted repairs, then re-validates the result. Processing stays entirely in your browser. Your pasted JSON is not uploaded to a fixjson.dev server for repair, which keeps private configs and sample payloads on your machine.

Use the editor below when you need a quick repair. Use the guides in the navigation when you want deeper explanation—common LLM JSON failure modes, trailing commas, JSON versus JSON5/JSONC, and schema validation. The sections further down the page document every repair class the fixer understands and answer frequent questions about privacy, validation, and schema checks.

What Gets Fixed

Trailing Commas

{"a": 1, "b": 2,}

Removes comma before } or ]

Single Quotes

{'key': 'value'}

Converts to double quotes

Unquoted Keys

{key: "value"}

Wraps keys in double quotes

Python Literals

{"flag": True, "val": None}

Converts True/False/None → true/false/null

Markdown Fences

```json
{...}
```

Strips code fence wrappers

Smart Quotes

{"key": "value"}

Replaces curly/smart quotes

JS Comments

{
  // comment
  "a": 1
}

Strips // and /* */ comments

Missing Colons

{"key" "value"}

Inserts missing : between pairs

JS undefined

{"val": undefined}

Replaces undefined with null

Frequently Asked Questions

Why does my LLM keep producing invalid JSON?

Large language models generate text token-by-token and do not run a JSON parser while writing. They often emit trailing commas, single quotes, Python-style literals (None, True, False), markdown fences, or truncated braces—especially on long responses. fixjson.dev detects and repairs these patterns automatically so you can move from model output to a strict parser in one step.

Is my JSON data sent to a server?

No. Repair, formatting, and the built-in schema checks run in your browser with client-side JavaScript. Your JSON does not leave your machine for the fixing workflow. Local history, when used, is stored only in your browser storage.

What is the difference between validation and fixing?

Validation checks whether text is syntactically correct JSON. Fixing attempts to repair common corruption so the text becomes valid. fixjson.dev repairs first, then validates the result and surfaces diagnostics when something cannot be salvaged.

What does schema validation do?

Schema validation checks whether your JSON matches an expected structure—required fields, data types, allowed values, and nested shapes—not just whether the syntax is valid. Open the Schema Validator after a successful fix to compare output against a JSON Schema subset.

When should I use pretty, minified, or sorted output?

Pretty print is best for reading and code review. Minified JSON is better for transport and storage. Sorted keys make diffs quieter when comparing two similar objects. Choose the mode that matches your next step in the pipeline.

Open the interactive JSON fixer above (after scripts load) to paste and repair malformed JSON in your browser.