v2.2 • Dev Tools • 1kb gzipped • MIT
RouteTiny
A one-kilobyte router with nested routes, lazy segments and no opinion about your view layer.

// why routetiny
One kilobyte, fully featured
Nested routes, parameters, wildcards and lazy loading, in less code than most routers spend on their configuration parser.
// 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
- Lazy segment resolution
- Wildcard matching for nested trees
- Now 1kb even with parameters
- Reworked the public API for consistency
- Deprecated helpers removed
- Fixed a memory leak on repeated teardown
- Source maps now published with every build
// related
Related products
ChartForge
Canvas charts in twelve lines. Responsive, accessible and dark-mode ready, with no D3 learning curve.
View →MotionEase
Physics-based micro-animations with a single call. Spring curves that feel right without a tuning session.
View →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.