Hash Generator
Generate MD5, SHA-1, SHA-256, and HMAC hashes.
Generate one or many version 4 UUIDs (also called GUIDs) using your browser cryptographic random source, with options for uppercase and hyphen removal. Everything runs 100% client-side in your browser.
How many
Nil UUID: 00000000-0000-0000-0000-000000000000. Version 4 UUIDs use 122 random bits generated by your browser crypto API, so they never leave this page.
A UUID is a Universally Unique Identifier: a 128-bit value designed so that anyone, anywhere, can mint one without asking a central authority for permission and still be confident nobody else will produce the same value. Written out in the canonical form it is 36 characters long, made of 32 hexadecimal digits split by four hyphens into groups of 8, 4, 4, 4, and 12.
Microsoft calls the same structure a GUID (Globally Unique Identifier). The layout, the length, and the guarantees are identical, so a value produced here drops straight into any system expecting either name.
The specification defines several versions, and they differ in where the bits come from. Some are derived from time, some from hashing a name, and some are simply random. The version digit is stored inside the value itself, so any UUID tells you how it was made.
| Version | How it is built | Notes |
|---|---|---|
| v1 | Timestamp plus the machine MAC address | Sortable by time, but it leaks the hardware address and the moment of creation |
| v2 | DCE security variant with a POSIX user or group id | Almost never used outside legacy DCE systems |
| v3 | MD5 hash of a namespace and a name | Deterministic: the same inputs always give the same UUID |
| v4 | 122 random bits | The general purpose default and what this tool generates |
| v5 | SHA-1 hash of a namespace and a name | Deterministic like v3 and preferred over it because SHA-1 beats MD5 |
| v7 | Unix millisecond timestamp followed by random bits | Time ordered and sortable, well suited to database primary keys |
Not every character in a v4 UUID is random. Two positions are reserved. The 13th hexadecimal digit (the first character of the third group) always holds the version number, so in a version 4 value it is literally the character 4. The 17th hexadecimal digit (the first character of the fourth group) holds the variant bits, and for the standard variant it is always one of 8, 9, a, or b.
That is why a version 4 UUID carries 122 random bits rather than the full 128: four bits go to the version and two to the variant. It also gives you a cheap sanity check when validating input, because a value with a 4 in the wrong place is not a well formed v4 UUID.
With 122 random bits there are roughly 5.3 times 10 to the power 36 possible v4 values. Applying the birthday bound, you would need to generate on the order of 2.7 times 10 to the power 18 UUIDs before reaching a 50 percent chance of a single collision. That is about 2.7 billion billion identifiers. Generating a million per second, you would be waiting roughly 85,000 years to reach that point.
The honest framing is this: a v4 collision is not impossible, it is simply so unlikely that other failure modes in your system (disk corruption, a bad deploy, a weak random source) are vastly more probable. The one real risk worth guarding against is a broken random source, which is why generating from a cryptographic source rather than a general purpose one matters.
One value is special: 00000000-0000-0000-0000-000000000000, called the nil UUID. It is reserved as an explicit "no identifier" sentinel. Some systems use it as a default column value, so treat it as a null marker rather than as a real id.
Choosing a primary key type is a real tradeoff rather than a matter of taste. UUIDs win on independence and privacy. Integers win on size and physical ordering.
| Concern | UUID | Auto-increment integer |
|---|---|---|
| Coordination | None needed, any client can mint a key offline | Requires the database to hand out the next value |
| Enumeration | Cannot guess the next id from one you hold | Trivially guessable, exposing record counts and other rows |
| Storage | 16 bytes binary, 36 characters as text | 4 or 8 bytes |
| Index locality | Random v4 values scatter inserts across the index | New rows append to the end of the index |
| Merging datasets | Safe, keys from separate systems will not clash | Painful, ranges overlap and need remapping |
The index locality problem is the one that bites at scale: because v4 values are random, each insert lands in an unpredictable place in a B-tree index, causing page splits and poor cache behaviour. Version 7 exists precisely to fix this. It puts a millisecond timestamp in the leading bits, so newly generated values sort near each other and inserts stay sequential while keeping the coordination-free property.
The tool above produces version 4 UUIDs using the Web Crypto API built into your browser, which draws from the operating system entropy pool rather than a fast pseudorandom function. Nothing is requested from a server and nothing is transmitted, so the identifiers you generate exist only on your device. Common uses include database primary keys, request correlation ids in logs, idempotency keys for payment and retry logic, file and object storage names, and test fixtures that need to stay distinct across runs.
Need a different kind of identifier or a hash instead? Browse the full developer tools collection for hash generators, random number generators, and encoders that pair well with id generation.
Unique identifiers are the glue of distributed systems: they let you create database keys without a central counter, trace a request across services, and deduplicate operations safely. This generator produces version 4 UUIDs, the random variant, drawing its bits from your browser's cryptographic random source so the values are strong enough for production use. Generate a single id or a whole batch at once, switch to uppercase, or strip the hyphens for compact storage. Because everything runs locally in your browser, no id is ever sent to a server, which makes this a fast and private way to mint keys, tokens, and correlation ids.