Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Toggle HMTL WhitespaceNew to Visual Studio Code? Get it now.
Toggle HMTL Whitespace

Toggle HMTL Whitespace

Richard Huang

|
7,673 installs
| (1) | Free
Toggles the whitespace of an HTML File
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

HtmlWhitespaceEliminatorToggle

This is an extension which toggles HTML file whitespace.

It converts />(\r?\n\s*)</g --> $1>< and reverts it back by /(\r?\n\s*)></g --> >$1<.

The extension will default to the first conversion if the file has mixed whitespace.

The default keyboard shortcut to both convert and revert is Ctrl+Shift+J.

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