Remove Comments from Code

Strip comments from 20+ programming languages — C, C++, C#, Java, MQL4/5, Python, JS, PHP, SQL and more.

100% Private — Nothing is Uploaded

All processing happens locally in your browser. Your files never leave your device and are never sent to any server.

Browse by language

About the Remove Comments Tool

This tool strips comments from source code while keeping the actual code, strings, template literals and regex patterns intact. It runs entirely in your browser — your code never leaves your device.

Supported languages

HTML, CSS, JavaScript, TypeScript, PHP, Python, C, C++, C#, Java, Kotlin, Swift, Go, Rust, MQL4/MQL5, Pascal, SQL, Shell, Lua, Ruby, Perl, R, MATLAB, VB.NET.

Features

  • Smart tokenizer — comments inside strings, template literals and regex are never touched.
  • Keep important comments — preserve license headers, @preserve, eslint-disable and similar directives.
  • Auto-detect — paste code and the language is detected automatically.
  • 100% client-side — your source code never leaves your browser.