JSON Comment Stripper & Repair
Remove // or /* */ comments from your JSON. JSON is a data-only format and does not support comments.
Problem Example
This invalid JSON will cause parsing errors
{
"port": 8080, // Web server port
/* Database config */
"db": "localhost"
}Why This Happens
Adding comments to JSON is a common mistake. While some parsers (like JSON5) allow them, standard JSON parsers will throw an error immediately.
How to Fix
Use our online tool to automatically repair this issue
Common Causes
This JSON error typically occurs when:
- Copying data from different programming languages
- Manual data entry without proper validation
- Using AI tools that generate non-standard JSON
- Exporting from applications with loose formatting
About JSON Standard
JSON (JavaScript Object Notation) is a strict data interchange format. Unlike JavaScript objects, JSON requires:
- All keys must be enclosed in double quotes
- String values must use double quotes (not single quotes)
- No trailing commas after the last item
- No comments allowed
- Proper escaping of special characters