Remove Comments

Clean code instantly, keep strings intact

Remove comments from code

Paste code, select rules, and instantly clean line and block comments while preserving quoted strings.

Supports a C-like preset (C, C++, C#, Java, JavaScript, PHP, Swift) plus Python, HTML, CSS, SQL, MATLAB, and Ruby. Runs locally in your browser. No server processing of your pasted code.
Settings ✓ Cleaned
Line Comment
Escape Symbol
Block Comment
Assumptions Correct syntax and strings are inside single or double quotes. At most one redundant escape symbol is expected.