Hash and ID Collision Probability Calculator
Work out the birthday-bound collision chance for a hash or ID of any bit length and number of items, or how many items give a chosen chance of a collision.
- Free
- No sign-up
- Works on any device
About Hash and ID Collision Probability Calculator
How many random IDs can you make before two of them are the same? This calculator uses the birthday bound: with N possible values and n items, the chance of at least one repeat is 1 minus e to the power of minus n times n minus 1 over 2N. Give the size as bits, hex or base64 characters, or a plain count of values, choose a preset such as UUID version 4 with 122 random bits, and see the chance for your item count and how many items give a chosen chance. A 32-bit value reaches a 50 percent chance at about 77,164 items.
How to use Hash and ID Collision Probability Calculator
- Pick a preset such as CRC-32 or SHA-256, or choose the unit and length of your own ID.
- Enter how many hashes or IDs you create, using forms like 1e6 or 2^30 if you like.
- Read the collision chance and the table of items needed for one in a billion up to 99 percent.
Why use this tool?
- Private: everything happens in your browser. Nothing you enter is uploaded.
- Free, with no sign-up, no watermark and no limit on how often you use it.
- Works on phones, tablets and computers: Android, iPhone, Windows, Mac and Linux. Nothing to install.
- Free to embed on your own website, with a ready-made code to copy.
Also known as
Frequently asked questions
Does a low collision chance make a hash secure?
No. This measures accidental collisions between random values. An attacker who wants a collision on purpose can sometimes find one far faster, which is why MD5 and SHA-1 are no longer trusted for security.
Why can the answer be given as one in a huge number?
For large spaces the chance is far below any percentage you could read, so it is shown in scientific notation, calculated from logarithms to avoid rounding to zero.
How accurate is the birthday bound?
It is exact for uniformly random independent values and accurate to a few digits in the usual cases. Real hash outputs are close to uniform, so it is the standard estimate.
Is Hash and ID Collision Probability Calculator free?
Yes. Hash and ID Collision Probability Calculator on Toolipedia is free to use, with no sign-up and no watermark.
Is it safe to use?
Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.
Does it work on my phone?
Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.
Do I need an account?
No. Just open the page and use the tool. There's no sign-up and no email needed.
Can I put Hash and ID Collision Probability Calculator on my own website?
Yes. Use the Embed on your site button under the tool to copy a short piece of code and paste it into your page. It is free, needs no account, and the tool keeps working inside your page.