How can I catch new posts?
Bookmark this blog and watch the homepage and tools hub—we surface new guides there. No account or mailing list is required to read articles.
Learn how the new JSON Repair Tool helps you automatically fix invalid or broken JSON – handling missing commas, comments, single quotes, and more, all locally in your browser with full privacy.
We just shipped a brand new tool in the JSON Work family: JSON Repair Tool.
When you copy JSON from logs, browsers, or third‑party tools, it’s often almost JSON – but not quite valid:
// comments and /* ... */null casingThe JSON Repair Tool is built exactly for these situations.
The tool takes invalid JSON as input and tries to turn it into valid JSON step by step, while keeping everything:
Today, the JSON Repair Tool can handle:
- Example:
- Before:
{
"name": "John",
"age": 30
"city": "New York"
}
- After (fixed):
{
"name": "John",
"age": 30,
"city": "New York"
}
- Both // line comments and /* block comments */
- Converts 'value' to "value" where it’s safe to do so
- Example: { name: "John" } → { "name": "John" }
- Normalizes True / False / NULL / Null to lowercase JSON literals
If the JSON is already valid, the tool just reformats it nicely and tells you it was already valid.
Under the hood, the JSON Repair Tool runs a sequence of small, safe transformations, trying to parse the JSON after each step:
- Remove BOM
- Normalize line endings
- Strip //... and /* ... */
- Looks for “value line” followed by a “key line” and auto‑inserts a comma
- Cleans up invalid , } or , ]
After each transformation, we try to run JSON.parse.
As soon as parsing succeeds, we stop and pretty‑print the result with standard JSON formatting.
If we still can’t parse at the end, we:
JSON.parse attemptYou can open the tool at:
/tools/formatters/json-repair (or the localized version under your language)Typical workflows where JSON Repair Tool shines:
- Testing in other tools
- Feeding into formatters / validators
- Sharing with your team
- Strip comments
- Fix small syntax issues
- Make the JSON readable again
- Schema validation
- Conversion to CSV / XML / YAML
- Static analysis or linting
Like the rest of JSON Work:
This is especially important when:
JSON Repair Tool is designed to work smoothly with other tools on JSON Work:
You’ll also find JSON Repair Tool linked in:
JSON Repair Tool focuses on safe, predictable fixes.
There are cases it won’t fix automatically, for example:
In these cases, the tool:
In upcoming iterations, we’re exploring:
You can start using JSON Repair Tool today:
If you have ideas for additional repair rules or edge cases you’d like us to support, feel free to reach out — we’re building JSON Work specifically for developers like you.
Building fast, privacy-first JSON tools for developers
More posts coming soon...
Back to BlogFollowing the blog, topics we cover, and how to suggest guides.
Bookmark this blog and watch the homepage and tools hub—we surface new guides there. No account or mailing list is required to read articles.
JSON validation, formatting, conversion, debugging workflows, and JSON Work releases—mapped to what the free on-site tools can do locally in your browser.
Yes. Reach out via the About page or GitHub; we prioritize guides tied to real integration and debugging scenarios.