Skip to main content

What is Univerto?

Univerto is a lightweight, zero-dependency, type-safe library for converting units in JavaScript/TypeScript. It provides a fluent API for precise and readable unit conversions with fraction-based calculations to avoid floating-point inconsistencies. Whether you’re building a scientific application, a fitness tracker, or any project that needs unit conversions, Univerto makes it simple and reliable.

Key Benefits

Type-Safe

Ensures only valid units are used with full TypeScript support

Zero Dependencies

Lightweight and easy to include in any project

Precise Calculations

Represents numbers as fractions internally to avoid floating-point inconsistencies

Fluent API

Chainable methods for easy and readable conversions

Use Cases

Univerto is perfect for:
  • Scientific Applications - Convert between metric and imperial units with precision
  • Fitness & Health Apps - Handle distance, weight, and time conversions
  • IoT & Hardware - Work with voltage, current, and frequency measurements
  • Data Processing - Convert between data storage units
  • Navigation & Maps - Calculate distances and speeds in different units
  • Recipe & Cooking Apps - Convert volume and mass measurements

Supported Unit Categories

Univerto supports 10 comprehensive unit categories:

Length

Nanometer, Micrometer, Millimeter, Centimeter, Meter, Kilometer, Inch, Hand, Foot, Yard, Chain, Furlong, Mile, League

Area

Square millimeter, Square centimeter, Square meter, Hectare, Square kilometer, Square inch, Square foot, Acre, Square mile

Volume

Cubic millimeter, Cubic centimeter, Cubic meter, Milliliter, Liter, Kiloliter, Cubic inch, Cubic foot, Fluid ounce, Cup, Pint, Quart, Gallon

Mass

Microgram, Milligram, Gram, Kilogram, Metric ton, Ounce, Pound, Stone, Short ton, Long ton

Time

Nanosecond, Microsecond, Millisecond, Second, Minute, Hour, Day, Week, Month, Year, Decade

Speed

Meter per second, Millimeter per hour, Kilometer per hour, Mile per hour, Knot, Foot per second, Inch per hour

Data Storage

Bit, Byte, Kilobyte, Megabyte, Gigabyte, Terabyte, Petabyte, Exabyte, Kibibyte, Mebibyte, Gibibyte, Tebibyte

Voltage

Millivolt, Volt, Kilovolt, Megavolt

Current

Milliampere, Ampere, Kiloampere

Frequency

Millihertz, Hertz, Kilohertz, Megahertz, Gigahertz, Terahertz, RPM, Degree per second

Next Steps

Installation

Install Univerto in your project

Quick Start

Get started with your first conversion

Build docs developers (and LLMs) love