Nano ID is a tiny, secure, URL-friendly unique string ID generator for JavaScript, designed to create short IDs with a URL-safe alphabet. It supports secure and non-secure modes (using hardware random generation by default) and can be customized by ID size or alphabet.
Project status
- Actively maintained: The repo has a very recent upstream push (2026-05-25) and npm/tag activity in 2026, including multiple updates in late April 2026.
- Update cadence: In 2026 there were several closely spaced updates around 2026-04-15 to 2026-04-30 (including multiple tags on 2026-04-30), followed by at least one more upstream activity on 2026-05-25. Earlier, updates appeared less frequently (for example, 2025-09-22 and 2025-03-18).
AI summary generated 2026-06-11
Recent updates
5.1.11
2026-04-30Release 5.1.11 is documented as a fix for “breaking Nano ID by requesting big ID”. The code changes in this version range include that size handling fix, but also show broader undocumented refactors across the Node and browser implementations, export style, and TypeScript types.
Breaking3.3.12
2026-04-30Release 3.3.12 states it fixes Nano ID breaking when requesting a big ID. The code change set goes far beyond that one-line note, introducing a major ESM/CJS packaging refactor (conditional exports and new entrypoint files) and adding explicit runtime bounds checking for requested ID sizes.
Features5.1.10
2026-04-30Release 5.1.10’s notes say it fixes a breaking issue in nanoid by “requesting big ID”. The actual code diff for this tag shows much broader changes beyond that single fix, including API surface removal (async entrypoints), ESM export changes, TypeScript typing changes, and modifications to the core ID generation algorithm and edge-case handling.
5.1.9
2026-04-15Release 5.1.9 publishes a version bump and claims to fix an npm package size regression. The code diff indicates the change is related to what gets included in the npm package rather than any runtime/API logic.
5.1.8
2026-04-15Release 5.1.8 claims a performance improvement to `customAlphabet`, stating it is 75% faster. The code diff shows a deeper change to the random ID generation algorithm used by `customRandom` (and therefore `customAlphabet`), not just a micro-optimization. The test expectations for deterministic `customRandom` outputs were updated accordingly.
5.1.7
2026-03-15Release 5.1.7 adds a CLI option to print the package version, updates the CDN-focused build artifact, and fixes documentation plus TypeScript typings for `customRandom`. The code diff also includes several additional changes related to TypeScript export mappings and the internal CDN build of `nanoid.js`.
Features5.1.6
2025-09-22Release 5.1.6 fixes an infinite loop when using `customAlphabet` with a size of 0. The core runtime change is a guard that returns an empty string for falsy `size` values, and the release adds regression tests for 0-size behavior.
5.1.5
2025-03-18Release 5.1.5 release notes only state: the package’s latest version on npm was fixed after the 3.x release line. The actual code diff between 3.3.11 and 5.1.5 includes substantial API and module-format changes (not just an npm metadata fix).
3.3.11
2025-03-18Release 3.3.11 is described as a fix for React Native support. The actual code changes go well beyond that, introducing a new ESM/CJS packaging layout (new `exports` map and `*.cjs` entry files) and updating build mappings for browser and React Native.
Features5.1.4
2025-03-15The 5.1.4 release notes only mention a packaging fix: "Fixed latest version on npm after 3.x release." However, the actual code diff from 3.3.10 to 5.1.4 contains much larger changes, including API surface changes (notably async removal), module system changes, and TypeScript signature updates.