Nano ID is a library for generating random IDs. Likewise UUID, there is a probability of duplicate IDs. However, this probability is extremely small. Meanwhile, a lot of projects generate IDs in small numbers. For those projects, the ID length could be reduced without risk. This calculator aims to help you realize the extent to which the ID length can be reduced. Instead of using the unsafe Math.random(), Nano ID uses the crypto module in Node.js and the Web Crypto API in browsers. These modules use unpredictable hardware random generator. Uniformity, random % alphabet is a popular mistake to make when coding an ID generator. The distribution will not be even; there will be a lower chance for some symbols to appear compared to others. So, it will reduce the number of tries when brute-forcing. Nano ID uses a better algorithm and is tested for uniformity.

Features

  • Nano ID uses a bigger alphabet, so a similar number of random bits are packed in just 21 symbols instead of 36
  • Nano ID code is 4.5 times less than uuid/v4 package: 108 bytes instead of 483
  • Because of memory allocation tricks, Nano ID is 60% faster than UUID
  • ID size calculator shows collision probability when adjusting the ID alphabet or size
  • nanoid-dictionary with popular alphabets to use with customAlphabet
  • nanoid-good to be sure that your ID doesn’t contain any obscene words

Project Samples

Project Activity

See All Activity >

Categories

Security, Calculators

License

MIT License

Follow Nano ID

Nano ID Web Site

Other Useful Business Software
Custom VMs From 1 to 96 vCPUs With 99.95% Uptime Icon
Custom VMs From 1 to 96 vCPUs With 99.95% Uptime

General-purpose, compute-optimized, or GPU/TPU-accelerated. Built to your exact specs.

Live migration and automatic failover keep workloads online through maintenance. One free e2-micro VM every month.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Nano ID!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript Security Software, JavaScript Calculators

Registered

2021-05-12