JSON comment remover
Strip // and /* */ comments from JSONC to make it valid JSON. Drop a file in rather than pasting it — it is read in your browser and never uploaded.
Related tools
All JSON, XML & formats tools →Open JSON comment remover and you get an answer straight away, with no account to create. Its place is under JSON, XML & formats; CSV to JSON converter and Flatten / unflatten JSON answer the questions closest to this one.
How to use it
- Open the tool — no signup or install needed.
- Enter your input or adjust the available options.
- Get your result instantly, then copy or download it.
Frequently asked questions
What does JSON comment remover do?
Strip // and /* */ comments from JSONC to make it valid JSON. Drop a file in rather than pasting it — it is read in your browser and never uploaded.
When would I actually use this?
Making a machine-generated blob readable, finding the character where a parse fails, and shrinking a file before it ships.
What is the most common mistake?
Assuming valid means correct. A document can parse cleanly and still have the wrong shape for whatever will read it — validation checks the syntax, not the schema.
How is JSON comment remover different from CSV to JSON converter?
They sit next to each other but answer different questions. CSV to JSON converter: parse CSV text (with header row) into a JSON array of objects, handling quoted fields. Drop a file in rather than pasting it — it is read in your browser and never uploaded. Pick whichever matches what you're starting from — both are free.
Is there a tool for the next step?
Flatten / unflatten JSON is the closest one after this: Flatten a nested JSON object into one level of path keys — and put it back together again. Arrays are indexed as user.roles[0] or user.roles.0, values keep their type, and an empty object stays visible as {}. Takes a whole file, so a long log does not have to go through the clipboard.
What else is worth having open alongside it?
JSON formatter, minifier and validator and JSON keys extractor — they come up in the same task often enough to be worth a second tab.
Where do the figures come from?
Parsing and serialisation follow each format's specification. Key order and whitespace are not semantically meaningful in JSON or YAML, so a reformatted document is equivalent even when the bytes differ.