Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>px-to-remNew to Visual Studio Code? Get it now.
px-to-rem

px-to-rem

Hemendra Khatik

|
33 installs
| (0) | Free
Convert px values to rem in your code with configurable root font size
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

px-to-rem

This extension helps you convert px units to rem in your code easily with a configurable root font size, making front-end development faster and more consistent.

Features

  • Convert px values to rem units in selected text or the entire file
  • Supports CSS, SCSS, LESS, JavaScript, TypeScript, HTML, and plaintext files
  • Configurable base font size (default is 16px)
  • Access the command via Command Palette or editor context menu
  • Fast and simple workflow to speed up front-end development


feature one



feature two

Requirements

No additional dependencies or setup are required. Just install the extension and start converting!

Extension Settings

Include if your extension adds any VS Code settings through the contributes.configuration extension point.

For example:

This extension contributes the following settings:

  • px-to-rem.baseFontSize: Configures the base font size used to calculate rem values. Default is 16.

Example:

"px-to-rem.baseFontSize": 16

📜 Changelog

0.0.2

  • ✅ Lowered engines.vscode to support older VS Code versions
  • 🔽 Downgraded @types/vscode to match compatibility

0.0.1

  • 🎉 Initial release with basic px → rem conversion functionality

License: MIT

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