Text UtilitiesText CleanersFree Tool
Remove Code Comments
Strip /* block */ and // line comments from code, plus the resulting blank lines — covers C-style comment syntax used by many languages.
How to Use Remove Code Comments
- 1Paste your code (C-style comment syntax)
- 2Click Convert
- 3Copy the code with comments removed
Frequently Asked Questions
/* block comments */ (including multi-line ones) and // single-line comments — the C-style syntax shared by JavaScript, TypeScript, Java, C, C++, C#, Go, Rust, Swift, and CSS.
No — this tool only recognizes // and /* */ syntax. Python, Ruby, and shell scripts use # for comments, which this tool won't detect or remove.
No — HTML uses a different comment syntax not covered by this tool. Use the HTML Minifier tool instead, which does strip HTML comments.
No — the removal happens entirely in your browser.
Related Tools
Remove Line Breaks
Replace every line break in your text with a single space, turning multi-line text into one continuous line.
Remove Extra Spaces
Collapse any run of whitespace (multiple spaces, tabs, line breaks) down to a single space, and trim the ends.
Remove Duplicate Lines
Remove repeated lines from a list, keeping only the first occurrence of each unique line, in original order.
Remove Empty Lines
Delete every blank or whitespace-only line from your text, keeping only lines with actual content.