- Tools
- UUID Generator
Free tool
UUID Generator
Generate random v4 and time-ordered v7 UUIDs, one at a time or a hundred at once. Choose the format, then copy the lot or a single value. Everything is generated in your browser.
Generating…
Identifiers that stay unique anywhere
A UUID is a 128-bit identifier, written as 32 hex characters in five groups. Its point is that any machine can mint one and trust it will not collide with a UUID made anywhere else, without asking a central server first. That property is why they show up as database primary keys, as idempotency keys on API requests, and as filenames for uploads.
This generator makes them with the browser’s cryptographic random source, the same quality a server library relies on. Pick a count, and every value in the list is freshly generated and yours alone.
v4 is random, v7 is time-ordered
A version 4 UUID is random from end to end. A version 7 UUID puts a millisecond timestamp at the front and fills the rest with random bits, so a batch of v7 values sorts into the order it was created. Both are unique; the difference is whether they carry a sense of time.
That difference matters for a database key. Random v4 values land all over an index, so a busy table ends up rewriting index pages across its whole range and fragmenting as it grows. v7 values arrive in roughly increasing order, so new rows attach near the end of the index and inserts stay quick. Reach for v4 when you want an identifier that gives away nothing about when it was made, and v7 when it is going to be a key.
Formatted for wherever it is going
The canonical form is lowercase with hyphens, and that is the default. The format toggles cover the other conventions you run into: uppercase for some systems, no hyphens for a compact 32-character string, curly braces for the Microsoft GUID style, and quotes for dropping a value straight into code or a SQL statement.
Nothing here is generated on a server, so no list of identifiers is ever logged or reused. Copy the whole batch with one button, or hover a row to copy just that one.
Frequently asked questions
- What is a UUID?
- A UUID, or universally unique identifier, is a 128-bit value written as 32 hexadecimal characters in five hyphenated groups, for example 550e8400-e29b-41d4-a716-446655440000. It is designed to be unique without a central authority, which makes it a common choice for database primary keys and distributed systems. GUID is Microsoft’s name for the same thing.
- What is the difference between UUID v4 and v7?
- A v4 UUID is entirely random. A v7 UUID starts with a millisecond timestamp and fills the rest with random bits, so v7 values sort in the order they were created. Both are unique, but only v7 is time-ordered.
- Should I use v4 or v7 for a database primary key?
- v7 is usually the better key. Because random v4 values are scattered, inserting them into an indexed column spreads writes across the whole index and causes fragmentation. v7 values arrive in roughly increasing order, so new rows append near the end of the index, which keeps inserts fast and the index compact. Use v4 when you specifically want values that reveal nothing about when they were made.
- Are these UUIDs random and safe?
- Yes. The random bits come from the Web Crypto API, which is a cryptographically strong source, not the ordinary pseudo random generator. That is the same quality of randomness a server library would use.
- Can I generate many at once?
- Yes. Choose a count of up to 100 and the tool lists them all. You can copy the whole list at once, or copy a single value by hovering over its row. The format options let you switch to uppercase, drop the hyphens, wrap each value in braces, or add quotes for pasting into code.
- Is anything sent to a server?
- No. The UUIDs are generated in your browser, so they never touch a server and are not logged anywhere. That also means each one is yours alone.
More free tools
Work with UUID keys in DB Pro
UUIDs are easy to make and awkward to eyeball in a table of results. DB Pro keeps them readable, with a data browser built for wide values and quick copying of any cell. It is a desktop database client for macOS, Windows, and Linux that works with PostgreSQL, MySQL, SQLite, and more.
Browse the other free tools, or read the database tutorials and cheat sheets.