Menu

1 / 2

How I built a 270-page unit converter with Next.js (and tested every factor against NIST)

DEV Community: tailwindcss·Kamran Ashraf·about 9 hours ago
#S9hTA8CA
#devtotailwindcss#devto#dev#unit#every
Long article (380 words) — no AI summary yet.
Reading 0:00
15s threshold

I recently launched Unitrify ( https://unitrify.com ), a free unit converter that covers 76 categories and nearly 600 units, from everyday length and weight to pressure, energy, data storage and currency. Here's how it's built and what I learned.

Why another unit converter?

Most converters I used were slow, full of pop-ups, or never showed how the answer was calculated. Some got regional units wrong. I wanted one clean place where every page shows the formula, a few worked examples and a conversion table.

The stack

Next.js (App Router) with plain JavaScript

Tailwind CSS for styling

Vercel for hosting

Almost every page is statically generated at build time, so pages load fast and the full content is in the HTML for search engines

One small engine for every unit

Every unit is stored as data, not code. Each one has a "kind":

Linear: base = value × factor (most units, e.g. meters, kilograms)

Affine: base = value × factor + offset (temperatures like °F)

Inverse: base = factor ÷ value (e.g.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.