Tiny and Fast Unique ID Generator

JSON →
library 2.0.2 ·javascript
verified May 27, 2026

The `uid` package provides a highly optimized and compact utility for generating fixed-length random unique IDs in JavaScript environments, supporting both Node.js and browsers. The current stable version is 2.0.2, with releases focusing on performance, bug fixes, and TypeScript compatibility, indicating an active maintenance and development cadence. Key differentiators include its extremely small footprint (130B to 205B gzipped) and high performance, with benchmarks showing it to be significantly faster than alternatives like `nanoid` in its default non-secure mode. It offers three distinct modes: `uid` (fast, `Math.random`-based, non-secure), `uid/secure` (cryptographically secure via `crypto.getRandomValues`), and `uid/single` (non-secure, no internal cache, ideal for short-lived environments). This flexibility allows developers to choose the appropriate balance of speed, security, and bundle size for their specific use case.

total hits 11
actors 4 distinct systems
last hit 4d ago AhrefsBot
GPTBot
5
Script
1
Search engines
1

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany · 🇫🇷 France