nanoid
npmv6.0.0TypeScriptA tiny (118 bytes), secure URL-friendly unique string ID generator
Overview
nanoid is an npm package that a tiny (118 bytes), secure URL-friendly unique string ID generator. The latest version is 6.0.0, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need a tiny (118 bytes), secure URL-friendly unique string ID generator and value a focused solution.
When not to use it
Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.
Pros
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
- Zero runtime dependencies — minimal footprint.
Cons
- No significant drawbacks detected from available metadata.
Auto-generated from collected registry metadata. No external claims are inferred.
Relationship graph
Dependencies (left) and dependents (right) of nanoid.
Used by
Popular packages that depend on nanoid.
Alternatives to nanoid
A querystring parser that supports nesting and arrays, with a depth limit
Encode a URL to a percent-encoded form, excluding already-encoded sequences
HTTP and HTTPS modules that follow redirects.
Create clickable links in the terminal
An implementation of the Unicode UTS #46: Unicode IDNA Compatibility Processing
Pure random number generator written in TypeScript
A robust Punycode converter that fully complies to RFC 3492 and RFC 5891, and works on nearly all JavaScript platforms.
Get an available port
Slugifies a String
RFC9562 UUIDs
Some useful utilities I often need
Resolve a URI relative to an optional base URI
Frequently installed together
The tiniest and the fastest library for terminal output formatting with ANSI colors
The Expo SDK
Node.js library that communicates with Embedded Dart Sass using the Embedded Sass protocol
Tools for making advanced Metro bundler features work
React Native for Web
Error overlay for universal Expo apps.
Vite DevTools
Generates and consumes source maps
An extremely fast JavaScript and CSS bundler and minifier.
TypeScript definitions for node
A pure JavaScript implementation of Sass.
Lightweight debugging utility for Node.js and the browser
Version history
| Version | Published | License |
|---|---|---|
| 6.0.0latest | 8 days ago | MIT |
| 3.3.16 | 9 days ago | MIT |
| 5.1.16 | 26 days ago | MIT |
| 3.3.15 | 29 days ago | MIT |
| 5.1.15 | 1 month ago | MIT |
| 3.3.14 | 1 month ago | MIT |
| 5.1.14 | 1 month ago | MIT |
| 5.1.13 | 1 month ago | MIT |
| 5.1.12 | 1 month ago | MIT |
| 3.3.13 | 1 month ago | MIT |
| 5.1.11 | 2 months ago | MIT |
| 3.3.12 | 2 months ago | MIT |
| 5.1.10 | 2 months ago | MIT |
| 5.1.9 | 3 months ago | MIT |
| 5.1.8 | 3 months ago | MIT |
| 5.1.7 | 4 months ago | MIT |
| 5.1.6 | 10 months ago | MIT |
| 5.1.5 | 1 year ago | MIT |
| 3.3.11 | 1 year ago | MIT |
| 5.1.4 | 1 year ago | MIT |
Maintainers
Funding
Frequently asked questions
How do I install nanoid?
Run `npm install nanoid` to add nanoid to your npm project.
What license is nanoid released under?
nanoid is distributed under the MIT license.
How popular is nanoid?
nanoid has approximately 0 downloads per week and 2 known dependent packages.