Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Remove Code CommentsNew to Visual Studio Code? Get it now.
Remove Code Comments

Remove Code Comments

xCzur3k

|
40 installs
| (0) | Free
Removes all comments from the current file.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Remove Comments

Description: This extension removes all comments from the current file in Visual Studio Code. It supports multiple programming languages including JavaScript, TypeScript, Python, HTML, CSS, SCSS, Java, C, C++, and JSON.

Features

  • Removes single-line and multi-line comments from code.
  • Automatically detects the language and applies appropriate regular expressions.
  • Removes empty lines along with comments to clean up your code.
  • Supports popular programming languages like JavaScript, TypeScript, Python, HTML, CSS, SCSS, Java, C, C++, and JSON.

Installation

To install this extension:

  1. Open Visual Studio Code.
  2. Go to the Extensions view by pressing Ctrl+Shift+X (Windows/Linux) or Cmd+Shift+X (Mac).
  3. Search for Remove Comments.
  4. Click Install.

Usage

  1. Open a file in Visual Studio Code.
  2. Press Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (Mac) to open the command palette.
  3. Type Remove Comments and select the Remove Comments from Current File command.

Alternatively, you can also right-click inside the editor and select Remove Comments from Current File from the context menu.

Supported Languages

  • JavaScript (// and /*...*/ comments)
  • TypeScript (// and /*...*/ comments)
  • Python (# and '''...'''/"""...""" comments)
  • HTML (<!--...--> comments)
  • CSS (/*...*/ comments)
  • SCSS (/*...*/ comments)
  • Java (// and /*...*/ comments)
  • C/C++ (// and /*...*/ comments)
  • JSON (// comments only)

Configuration

This extension does not require any configuration. It works out of the box for all supported languages.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft