Skip to content
All tools
English

UUID and ULID generator

One id or a thousand, in the format your database expects. Generated on your device with crypto.getRandomValues.

Your data never leaves your device
Type
Options

Inspect a UUID or ULID

Paste an id to see its version and the time it was created.

How to use it

  1. Choose a type

    v4 for random ids, v7 or ULID when you want ids that sort by creation time.

  2. Set count and format

    Upper case, without hyphens, or with braces for .NET and the Windows registry.

  3. Copy or download

    Copy all ids at once or download them as a text file, one per line.

v4, v7 or ULID?

  • UUID v4 is 122 random bits. It reveals nothing and is the safe default for ids that appear in URLs or APIs.
  • UUID v7 (RFC 9562, 2024) starts with a millisecond timestamp, so new ids sort after old ones. Databases like that: inserts go to the end of a B-tree index instead of random pages, which keeps indexes smaller and writes faster in PostgreSQL, MySQL and SQL Server.
  • ULID has the same idea (48-bit time + 80 random bits) written as 26 Crockford Base32 characters, which is shorter and case-insensitive. Use it when the id is shown to people or used in file names.

Both v7 and ULID reveal when the id was created, to the millisecond. If that matters (for example, account ids that would expose sign-up dates), use v4.

Will two UUIDs ever collide?

For v4, you would need to generate about 2.7 × 1018 ids to have a 50% chance of a single collision. In practice a collision means a bug, such as a weak random generator. This page uses crypto.getRandomValues, the browser's cryptographically secure generator, never Math.random.

Inspecting an id

Paste a UUID or ULID into the inspector to see its version, variant and, for v1, v6, v7 and ULID, the moment it was created. Handy when you are reading logs: the time inside a v7 id tells you when the record was made. Convert that time to other zones with the timestamp converter.

Frequently asked questions

What is a GUID?
Microsoft's name for a UUID. Same 128-bit format; .NET and the registry often write it in upper case with braces, which you can switch on here.
Should I store UUIDs as text?
Use the native type when there is one (uuid in PostgreSQL, uniqueidentifier in SQL Server) or BINARY(16) in MySQL. Text takes 36 bytes and compares more slowly.
Is a UUID secret enough to use as a token?
A v4 UUID is hard to guess, but tokens should come from a dedicated generator with at least 128 random bits and be stored hashed. Never use v1 or v7 as secrets: part of them is a timestamp.