UUID Generator
Generate UUID v4 values.
How it works
Generate UUID v4 values.
FAQ
This tool is free for core use.
When should you use this?
Use this when you need a unique identifier for a database record, session ID, or API key.
When shouldn't you use this?
If you need to sort records by creation order, a UUID alone won't do that, you'll need a separate timestamp field too; UUIDs aren't sequential.
Step-by-step
- Enter how many UUIDs you need in the 'Count' field. Use 1 for a single ID, or a larger number for test data.
- Click Generate UUID.
- Copy the values. Each is a 36-character string in the 8-4-4-4-12 pattern, separated by hyphens.
- When pasting into code, an SQL script or a fixture file, check that quotes and hyphens come through intact.
Example
You're writing sample JSON responses for a new API and every order needs an ID. Set Count to 10 and click once to get 10 distinct IDs. Use them in your fixtures and, if that test data is ever merged with real records, the chance of a clash is so small it can be ignored in practice.
A version 4 UUID is made almost entirely of random bits. The first character of the third group is always 4, which is a quick way to tell a v4 value from other versions.
What is a UUID?
A UUID is a 128-bit identifier meant to be universally unique, written as 36 characters in an 8-4-4-4-12 pattern (hexadecimal blocks with hyphens between). This tool produces version 4: the values are chosen at random. The chance of two randomly chosen UUIDs colliding is practically negligible, so they are used to create unique IDs without a central counter.
When using UUIDs
- A UUID is not a secret key; it grants no authority and its unpredictability should not be treated as a security guarantee.
- If they must sort by creation order, version 4 is not suitable; consider time-ordered variants.
- Storing a UUID in a database as a binary type instead of text can save space and time.
- Do not reuse the same ID across several records.
Things to keep in mind
- A UUID is an identifier, not a secret. Where a value must be unguessable, such as a password reset link, use a token generator built for security.
- Random UUIDs as primary keys can hurt index performance on very large tables. If you need IDs that sort by creation time, look at time-ordered versions like UUID v7.
- Storing UUIDs in your database's native UUID type usually takes less space than storing them as text.
- Keep the letter case consistent. Systems that compare UUIDs as plain strings may treat an uppercase and a lowercase copy of the same value as different.
Frequently asked questions
Is the code/data I enter stored anywhere?
No, nothing is sent to a server or stored; processing happens entirely in your browser.
Does it work with large inputs?
Yes, though performance may degrade with very large inputs (several MB or more).
Is this tool free?
Yes, it's completely free for core use and requires no account.