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.
... needed, in order to have a 1% probability of at least one collision.
A Few Values to Feel the Scale
- Human lifespan: 79 years.
- Life on Earth will be impossible in ~1.1 billion years.
- Age of the Earth: ~4.543 billion years.
- Age of the Universe: ~13.799 billion years.