Code Comment Remover
Strip comments from six language families without breaking string literals.
Removing comments from code is harder than deleting everything after a marker, because "//" inside a URL string and "#" inside a quoted value are not comments. This tool scans character by character while tracking string state, so literals survive intact — and it can preserve a licence header.
Runs in your browser- Privacy
- Runs entirely in your browser — nothing is uploaded
- Cost
- Free, unlimited, no sign-up
Frequently asked questions
Should I strip comments before deploying?
How to use the code comment remover
- 1Enter or paste your code.
- 2Choose the language.
- 3Turn "Remove the blank lines left behind" on or off as needed.
- 4Turn "Keep licence headers" on or off as needed.
- 5The result appears immediately — copy or download it.
Embed this tool
Put the working code comment remover on your own site. It runs in your visitors' browsers exactly as it does here — free, no account, nothing uploaded.
Share this tool
Related tools
HTML, CSS & JS MinifierStrip whitespace and comments to shrink HTML, CSS and JavaScript for production.Tabs to Spaces ConverterConvert indentation between tabs and spaces without disturbing alignment inside lines.CSV Duplicate RemoverRemove duplicate rows from a CSV, matching on every column or just a key you choose.JSON to C# Model ConverterConvert JSON objects into strongly-typed C# Model definitions and data models.JSON to Dart Class ConverterConvert JSON objects into strongly-typed Dart Class definitions and data models.JSON to Go Struct ConverterConvert JSON objects into strongly-typed Go Struct definitions and data models.
Last updated
More developer tools