Fix Invalid JSON: From 'What's Wrong' to a Clean File
Repair JSON that looks almost right — trailing commas, single quotes, unquoted keys — using a smart formatter that tolerates almost-JSON and then validates strictly.
When you land here
You have a JSON file that almost works. The parser rejects it, but the structure is clearly readable. This hub points to the smart-repair workflow that handles the most common almost-JSON mistakes, plus the strict validator that confirms the cleaned file before you ship.
The four mistakes that cover 90% of broken JSON
Almost every invalid-JSON ticket is one of trailing commas, single quotes, unquoted keys, or a stringified object printed where parsed JSON was expected. Each has its own guide.
When repair isn't safe
Auto-repair guesses are safe for quote-style and trailing commas, but unsafe for missing keys, missing brackets, or ambiguous numbers. Treat repair as a syntax assistant; validate the business contract afterward.
Repair locally, not on someone's server
Recent incidents have shown that pasting JSON into a third-party formatter leaks the contents. The repair, validation, and minify workflows on this site run entirely in your browser tab — nothing is uploaded.
Recommended path
From the broken text to a clean file in four steps.
- 1. Tool: / — paste the broken JSON, click Repair & Format.
- 2. Guide: /guides/json-formatter-vs-json-repair — confirm which mode you actually need.
- 3. Blog: /blog/fix-json-online — full walkthrough.
- 4. Reference: /news/online-json-formatter-data-leak — why local processing matters.
JSON repair guides
Topic hubs
Specific guides
- How to Decode Base64 Strings (and JWT Payloads)
- URL Encoding: Percent-Encode Query Parameters and Paths
- Convert YAML to JSON (and Avoid Indentation Errors)
- Convert JSON to CSV: Flatten an Array of Objects
- Convert JSON to XML: Root Elements, Attributes, and Arrays
- Escape JSON as a String Literal (and Decode Double-Encoded JSON)
- Fix Trailing Comma in JSON
- Fix Single Quotes in JSON
- Fix Unquoted Keys in JSON
- Repair LLM JSON Output
- Fix JSON Parse Error: Expected Property Name
- JSON vs JS Object Literal: The Key Differences
- Validate JSON Before API Requests
- JSON Formatter vs JSON Repair
- Fix JSON Unexpected Token Errors
- JSON to JavaScript Object Converter