- Very small — 130 bytes (minified and gzipped);
- No dependencies;
- Fast — It is faster than other generators.
- Safe — It uses hardware random generator. Can be used in clusters.
- Short IDs — It uses a larger alphabet than UUID (
A-Za-z0-9_-
). So ID size was reduced from 36 to 21 symbols.
- In most of the random generators, they use unsafe Math.random(). But, NanoID uses crypto moduleand Web Crypto API which is more secure
- NanoID is 60% faster than the UUID