SQL Comment Remover.

Remove comments before sharing or reviewing a standard SQL snippet.

Runs entirely in your browser

For example, SELECT 'a--b' /* note */ AS value; -- draft becomes SELECT 'a--b' AS value;. Review the result before running it.

0 characters

Maximum 1,000,000 characters. Standard SQL quoting and comments only.

Paste SQL to begin.

FIELD NOTES / 035

Keep the query text, remove the notes.

Remove standard SQL -- line comments and /* */ block comments while preserving quoted text and line breaks.

Good to know

Paste up to 1,000,000 characters of standard SQL. The tool removes -- line comments and /* */ block comments. Single-quoted strings and double-quoted identifiers with doubled quotes are preserved. Dollar signs, nested comments, optimizer hints, executable comments, MySQL backslash escapes, backtick or bracket identifiers, and # comments are rejected. It does not validate or execute SQL.

Only comment text is removed; line breaks inside block comments remain. If the input contains only comments, there is no SQL output to copy or download. Format SQL instead →

0 / 2,000