Skip to content

v2.2 • Dev Tools • 1kb gzipped • MIT

RouteTiny

A one-kilobyte router with nested routes, lazy segments and no opinion about your view layer.

★ 9.7kGitHub
↓ 14.0k / week● MIT● TS 5.0+
routetiny-preview.png
Abstract preview graphic for RouteTiny

// why routetiny

One kilobyte, fully featured

Nested routes, parameters, wildcards and lazy loading, in less code than most routers spend on their configuration parser.

● 0 deps● 12ms cold start● CI ready

// stack

History-native

Uses the History API directly. No hash fallback, no synthetic event system to debug.

RouteTiny started as a single file in a client project and stayed small on purpose. It does one job, it does it in 1kb gzipped, and it has no runtime dependencies.

Getting started

Install it, import it, call it:

npm i routetiny-js

Nested routes, parameters, wildcards and lazy loading, in less code than most routers spend on their configuration parser.

What it does not do

It does not manage your state, style your components or ship a plugin system. Those are your decisions, and keeping them out is what keeps the bundle honest.

  • Nested route trees
  • Lazy segments
  • MIT licensed, commercially friendly

Features

Nested route trees

Layouts compose naturally, and a child route can resolve independently of its parent.

Lazy segments

Any segment can be a dynamic import, resolved once and cached.

Readable reports

Terminal output for humans, JSON for everything else.

ESM and types

Ships module and CommonJS builds with hand-written type definitions and source maps.

CI first

Exits with a meaningful status code and prints machine-readable output on request.

Config optional

Sensible defaults mean RouteTiny does something useful before you configure anything.

Get RouteTiny v2.2

9 files • .min.js 1kb • .zip 95kb • sha384 verified

Changelog

v2.2 Apr 9 2026 • latest
  • Lazy segment resolution
  • Wildcard matching for nested trees
  • Now 1kb even with parameters
v2.1.3 Jan 29 2026
  • Reworked the public API for consistency
  • Deprecated helpers removed
v2.1.2 Oct 29 2025
  • Fixed a memory leak on repeated teardown
  • Source maps now published with every build
View full archive →

// related

Related products

Sep 10 • v2.0

ChartForge

Canvas charts in twelve lines. Responsive, accessible and dark-mode ready, with no D3 learning curve.

View →
Aug 30 • v3.2.1

MotionEase

Physics-based micro-animations with a single call. Spring curves that feel right without a tuning session.

View →
Aug 19 • v1.9.4

FormFlow

Validation and multi-step logic that works the same in React, Vue and vanilla. Your markup stays yours.

View →

Wire it into CI today.

MIT licensed. Commercial friendly. Five-minute setup.