Input — paste anything

Remove Comments from JSON — Fix "Unexpected Token /" Errors

JSON does not support comments — the // and /* */ syntax is JavaScript-only. Any JSON parser will reject commented JSON immediately. Paste your commented JSON below and JSONBlitz strips all comments and returns valid, clean JSON.

⚡ Auto-fixed issues see changes ↓
Ready — paste JSON or any text containing JSON
🌳
Tree view appears here after processing
Click nodes to copy JSONPath • Single-click a leaf to copy value
Formatted output appears here...
Process JSON to generate code...
Insights appear after processing
Shows what JSONBlitz changed to fix your JSON.
No changes recorded yet.
⚖ Compare two JSONs →
⌘↵ fix & copy  ⌘⇧V paste & fix  ⌘K actions © 2026 JSONBlitz

Remove Comments from JSON — Fix "Unexpected Token /" Errors Online Free

JSON does not support comments. The // and /* */ syntax is valid JavaScript but causes an "unexpected token" or "unexpected character" error in any JSON parser. JSONBlitz strips both single-line and multi-line comments automatically and gives you valid JSON output.

Why JSON Does Not Allow Comments

JSON was designed by Douglas Crockford as a minimal data interchange format. Comments were deliberately excluded — the reasoning was that JSON is data, not code, and data does not need inline documentation. Despite many requests, the JSON specification has never added comment support. JSONC (JSON with Comments) is a popular superset used in some tools like VS Code config files, but it is not standard JSON.

How JSONBlitz Removes JSON Comments

Paste your commented JSON and JSONBlitz removes all // single-line comments and /* */ multi-line comments, then validates and formats the remaining content. The Diff tab shows which lines were removed.

Frequently Asked Questions

Can JSON have comments?
No. The JSON specification does not permit comments. Both // and /* */ will cause a parse error in any strict JSON parser.
What is JSONC?
JSONC (JSON with Comments) is a superset of JSON that allows comments. It is used in VS Code configuration files and some other tools, but it is not standard JSON and most parsers will reject it.
Will removing comments break my data?
No. Comments are not data — removing them does not change any values, keys, or structure in the document.

© 2026 JSONBlitz — JSON comments error, remove comments from JSON, JSONC to JSON, unexpected token slash JSON, fix JSON comment error

Recent Sessions