Developer Tools
UUID Generator
Generate secure version 4 UUIDs in your browser.
Input stays in this browser while you use the tool.
About this tool
The UUID Generator creates random UUIDs that you can copy and use as unique identifiers. UUID stands for Universally Unique Identifier. It is a 128-bit value written as 32 hexadecimal digits in five groups separated by hyphens, in the pattern 8-4-4-4-12, which makes 36 characters in total. A typical UUID looks like 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d.
UUIDs exist because many systems need identifiers without asking a central place for the next number. A database, a mobile app and a web service can each create a UUID on their own, and the chance that two of them ever produce the same value is so small that it can be ignored in practice. That is why UUIDs are used as record ids, request ids, file names, event ids and idempotency keys. Microsoft systems call the same thing a GUID, short for Globally Unique Identifier.
There are several versions. Version 4 is the most common and is built from random numbers. Of its 128 bits, 122 are random and 6 are fixed to mark the version and the variant. For this reason the first character of the third group of a version 4 UUID is always 4, and the first character of the fourth group is always 8, 9, a or b. To have even a 50 percent chance of a single collision, you would have to generate about 2.7 quintillion version 4 UUIDs.
A UUID is an identifier, not a secret, and it should not be used as a password or a security token. The generation runs in your browser, so the values are created on your own device and are not sent to the BitToolsKit server.
Use cases
- Create ids for database records. A UUID can be generated by the application before the row is saved, so you do not have to wait for the database to hand out a number.
- Write test data and fixtures. Realistic, unique ids make sample records, mock API responses and seed files easier to build.
- Generate request and correlation ids. Attaching a UUID to a request lets you follow it through logs across several services.
- Name uploaded files. A random UUID as a file name avoids clashes between two files with the same original name and does not expose the original name.
- Create idempotency keys. Payment and order APIs often ask for a unique key so that a retried request is not processed twice.
- Work in distributed systems. When data is created on several servers or devices that may be offline, UUIDs let each one create ids without coordinating.
- Learn how identifiers work. Generate a few values and read their structure, to see the fixed version character and the groups of 8, 4, 4, 4 and 12 digits.
How to use
- Choose any generation options the tool shows, for example how many UUIDs you want to create.
- Click Run tool to generate the UUID or UUIDs.
- Read the result in the Output box. Each UUID has 36 characters, including the four hyphens.
- Click Copy output to copy the UUIDs to your clipboard, or Download to save them as a file.
- Click Run tool again whenever you need new values. Each run produces different UUIDs.
- Click Clear to empty the boxes.
If your system expects a different layout, such as capital letters or no hyphens, you can adjust the text afterwards. For capital letters, paste the UUID into the Case Converter and choose uppercase.
Examples
Example 1: One random UUID
Action: Generate one UUID
Example output (yours will be different every time): 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d
Example 2: Reading the parts of a version 4 UUID
UUID: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d
Group 1: 9b1deb4d (8 digits) Group 2: 3b7d (4 digits) Group 3: 4bad (4 digits). The first digit, 4, is the version. Group 4: 9bdd (4 digits). The first digit, 9, is the variant. It is always 8, 9, a or b. Group 5: 2b0d7b3dcb6d (12 digits)
Example 3: The same UUID in the formats you may meet
UUID: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d
Standard: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d
Uppercase: 9B1DEB4D-3B7D-4BAD-9BDD-2B0D7B3DCB6D
Without hyphens: 9b1deb4d3b7d4bad9bdd2b0d7b3dcb6d
In braces (GUID style): {9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d}Example 4: Making a version 4 UUID in code
Task: Create a UUID in your own program
JavaScript: crypto.randomUUID() Python: import uuid; str(uuid.uuid4())
Example 5: The nil UUID
UUID: 00000000-0000-0000-0000-000000000000
This is the special nil UUID, with every digit set to zero. It is used as an empty or placeholder value and is not randomly generated.
Common errors
A system rejects a UUID as invalid
A valid UUID has exactly 32 hexadecimal digits, which are 0 to 9 and a to f, in the groups 8-4-4-4-12. Check for a missing or extra character, a letter beyond f, a space, a quotation mark or a line break copied with the value.
Using a UUID as a password, token or secret
A UUID is meant to be unique, not secret. It can be logged, shared in URLs and guessed by tools that know the format. Use a proper secret generator or your framework's token functions for anything that grants access.
Two copies of the same UUID in a list
Properly generated UUIDs do not collide, so a repeat almost always means the value was copied twice or reused by mistake. Generate a fresh value for each record.
Comparing UUIDs fails because of capital letters
The same UUID can be written in upper or lower case. Convert both sides to lowercase before comparing, or use a UUID type that stores the value as 16 bytes.
A database column rejects a UUID or truncates it
A UUID with hyphens needs 36 characters, or 32 without them. Use a column that is long enough, or a native UUID type if your database has one. Never cut a UUID down to make it fit.
Hyphens are missing or added in the wrong place
Some systems store UUIDs without hyphens and others require them. Convert to the format the receiving system expects, and keep the groups as 8-4-4-4-12 when hyphens are used.
Expecting UUIDs to sort in the order they were created
Version 4 UUIDs are random, so they have no time order. If you need ids that sort by creation time, look at time-ordered versions such as version 7, or add a separate timestamp column.
Slow database inserts with random UUID primary keys
Random values are inserted all over an index, which can hurt performance in large tables. Consider time-ordered UUIDs or a separate numeric key if this becomes a problem, and measure before you change anything.
Believing that uniqueness is absolutely guaranteed
Version 4 uniqueness is statistical, not absolute. The chance of a duplicate is far smaller than the chance of a hardware fault, but if a duplicate would be harmful, keep a unique constraint on the column.
Using a generator that is based on weak random numbers
Ids made from a simple random function such as Math.random in older code can be predictable and collide more often. Use a generator that relies on the system's cryptographically secure random source, such as crypto.randomUUID in modern browsers.
Frequently asked questions
What is a UUID?
A UUID, or Universally Unique Identifier, is a 128-bit value used to identify something without a central registry. It is written as 32 hexadecimal digits in five groups separated by hyphens, for example 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d.
What is the difference between a UUID and a GUID?
They are the same thing. GUID is the name used in Microsoft products and often shown in braces and in capital letters, while UUID is the name used in the standard and in most other systems.
What does version 4 mean?
The version describes how the UUID is made. Version 4 is built from random numbers and is the most widely used. It is recognisable by the digit 4 at the start of the third group.
Can two UUIDs ever be the same?
In theory yes, but in practice the chance is negligible. A version 4 UUID has 122 random bits, and you would have to generate roughly 2.7 quintillion of them to reach a 50 percent chance of a single duplicate.
Is a UUID secure enough to use as a password or token?
No. A UUID is designed for uniqueness, not secrecy, and it has a known format. Use a dedicated secure token or password generator for anything that protects an account or data.
Can I use a UUID as a database primary key?
Yes, it is common, especially when records are created on several systems. The trade-offs are that a UUID takes more space than a small integer and random values can slow inserts in very large tables.
Should a UUID be written in upper or lower case?
Both are valid and mean the same value. The standard recommends lowercase for output, and a good system treats the two cases as equal when it reads one.
What is the nil UUID?
It is the special value 00000000-0000-0000-0000-000000000000, with every digit set to zero. It is used as an empty or placeholder id.
Is it safe to put a UUID in a URL?
Yes. UUIDs contain only digits, letters a to f and hyphens, which are safe in URLs. Remember that anyone who has the URL has the id, so do not rely on the UUID alone to protect private data.
Are the UUIDs sent to a server?
No. The tool runs in your browser and generates the values on your device, so they are not sent to the BitToolsKit server. As a general habit, avoid pasting passwords, API keys or private tokens into any online tool.