Text UtilitiesText CleanersFree Tool
Remove SQL Comments
Strip /* block */ and -- line comments from SQL code, plus the resulting blank lines.
How to Use Remove SQL Comments
- 1Paste your SQL code
- 2Click Convert
- 3Copy the code with comments removed
Frequently Asked Questions
Both /* block comments */ (including multi-line ones) and -- single-line comments, which cover the two standard SQL comment syntaxes.
Yes — lines that become empty (or were empty) after comment removal are cleaned up, and the result is trimmed.
No — only /* */ and -- styles are recognized; MySQL's # single-line comment syntax isn't matched by this tool.
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.