GitHub


Features

  • 5 category tabs: Temperature, Length, Weight, Area, Volume
  • 35+ units across all categories
  • Live conversion as you type — no button press needed
  • Swap button to instantly exchange source/target units
  • Clean tabbed interface with smooth transitions
  • Dark theme with orange accent (#ff6b35)

How It Works

Each category has a conversion factors object mapping unit → base unit. When the user types a value, it's converted to the base unit, then to the target unit using conversion factors. Temperature uses formula-based conversion (C × 9/5 + 32, C + 273.15, etc.). The Swap button exchanges source and target selectors and re-runs the conversion.

Usage

  1. Open https://soumendrak.github.io/unit-convert/ in any browser.
  2. No build step, no installation, no server required.
  3. Deploy anywhere — GitHub Pages, Netlify, or any static host.
git clone https://github.com/soumendrak/unit-convert.git
# Open index.html directly

License

Licensed under the MIT License.


Built with ❤️ and zero dependencies

Read the original on github.com ↗