A simple unit converter for web developers. Supports CSS length units, viewport units, typography units, and design proportions. Includes keyboard shortcuts for quick copying.
- 18 Unit Types: CSS length units (px, rem, mm, cm, pt, pc, in, ft), viewport units (vw, vh, vmin, vmax), typography units (ch, ex), and design proportions (Golden Ratio, Root 2, 16:9)
- Real-time Bidirectional Conversion: Convert from any unit to any other instantly
- One-Click Copy: Quickly copy any converted value to clipboard with visual feedback
- Precision Rounding: All conversions rounded to 3 decimal places for practical use
- Dark Mode: Choose between Light, Dark, or System theme (follows OS preference)
- Configurable Settings: Customize viewport dimensions, base font size, PPI, and character ratios
- Persistent Preferences: All settings and last conversion saved to localStorage
- Responsive Design: Optimized layouts for desktop, tablet, and mobile devices
- Detailed Information: Expandable panels showing calculation breakdowns for key units
- Touch-Friendly: Mobile-optimized with touch-friendly controls
- Toast Notifications: Clear feedback for all copy actions
UnitSwitch is built with Deno. Follow these steps to run locally:
-
Clone the Repository:
git clone https://github.com/your-username/unitswitch.git cd unitswitch -
Install Deno: If you don't have Deno installed, the build script will handle it, or install manually from deno.land.
-
Start the Development Server:
deno task dev
-
Access UnitSwitch: Open your browser and navigate to
http://localhost:5173
deno task buildThe optimized build will be output to the dist/ directory.
- Enter a Value: Type any number into the input field
- Select Your Unit: Choose the unit you're converting from using the dropdown
- View Conversions: All other units update automatically in the grid
- Copy Results: Click any conversion to copy it, or use keyboard shortcuts (hover to see the hotkey)
- Quick Convert: Press
Ctrl+Kfor fast modal-based conversions - Customize: Press
Ctrl+/to adjust settings like viewport size, base font size, and theme
UnitSwitch leverages modern, lightweight technologies:
- Deno: Modern TypeScript runtime with built-in tooling
- Custom JSX Runtime: Lightweight JSX implementation (no React dependency)
- Vite + Rolldown: Lightning-fast build tool and bundler
- Tailwind CSS v4: Utility-first CSS framework with Vite plugin
- TypeScript: Strict type checking for reliability
- Custom State Management: Minimal reactive state library
UnitSwitch is maintained by Jacob Benison.
This project is licensed under the MIT License. See the LICENSE file for more details.
