UUID & ID Generator
Generate one ID or a thousand in the format you need, copy them in one click, and paste any UUID or ULID to see what it contains.
122 random bits. The default choice for a unique ID.
Inspect an ID
Paste a UUID, ULID or any token to see its version, embedded timestamp and other forms.
Which ID should I use?
Everything is generated with the browser's cryptographic random number generator and never leaves your machine. IDs created in the same millisecond are kept strictly increasing for UUID v7 and ULID.
- UUID v4 is the safe default: 122 random bits, supported everywhere. Its only downside is that random keys scatter writes across a database index.
- UUID v7 (RFC 9562) puts a millisecond timestamp first, so new IDs sort after old ones. Use it for primary keys in Postgres, MySQL or SQLite when you want UUIDs that are also roughly chronological.
- ULID is the same idea as v7 in a shorter, case-insensitive, 26-character form. It converts losslessly to and from a UUID.
- UUID v5 and v3 are deterministic: hash a namespace and a name and you get the same UUID every time. Handy for idempotency keys or mapping external IDs.
- NanoID is for short IDs in URLs. Pick the alphabet and length and the tool tells you how many bits of entropy that gives.
- Random tokens are plain random bytes for API keys, session secrets and salts. 32 bytes (256 bits) is plenty.
Frequently asked questions
- Are these UUIDs safe to use in production?
- Yes. They come from crypto.getRandomValues, the same cryptographic generator libraries use, and follow RFC 9562 exactly. Generating them here is no different from generating them in your own code.
- UUID v4 or v7 for a database primary key?
- Prefer v7. Its leading timestamp means new rows land at the end of the index instead of at random positions, which keeps inserts fast and indexes compact. Use v4 when you must not leak creation time.
- What is the difference between a ULID and a UUID v7?
- Both are 128 bits with a millisecond timestamp first. ULID is written as 26 Crockford base32 characters, UUID v7 as the familiar 36-character hex form. The tool converts between them.
- Can I decode a UUID to find out when it was created?
- For v7 and ULID, yes: paste it into the inspector and the embedded timestamp is shown. v1 exposes a timestamp too. v4 is pure randomness and carries no date.