UUID Generator Online: UUID v4, v7 and Minecraft
Choose the version and press Generate. Everything happens in your browser, the UUIDs are made with its secure random numbers and are not sent or saved anywhere. The page remembers only your choices.
Check a UUID
UUID Generator: Random UUID v4, UUID v7 (GUID) and Minecraft Offline UUID
Choose the version, press the button and get a new UUID, for example 3f2b8c1e-9a4d-4e7b-8c21-5d6f0a9b7e34. Copy it with one click and paste it into your code, a database, a config file or a test. You can make up to 1000 UUIDs at once, write them in capital letters, without hyphens or in braces, and check the version of any UUID that you paste. The same identifier is called a GUID in Microsoft products (.NET, SQL Server, Windows), and the format is the same.
Everything happens in your browser: the UUIDs are made with the secure random numbers of the browser (crypto.getRandomValues), so nothing is sent to a server and nothing is saved.
What a UUID is
UUID means Universally Unique Identifier. It is a 128-bit number written as 32 hexadecimal digits in five groups divided by hyphens (8-4-4-4-12, 36 characters in all). The idea is simple: any computer can make an identifier on its own, without asking a central server or a database, and nobody else will make the same one.
In version 4 122 of the 128 bits are random. The other six bits are fixed: the first digit of the third group is always 4 (the version), and the first digit of the fourth group is always 8, 9, a or b (the variant). You can check any UUID v4 by these two places.
Can two UUIDs be equal?
In theory yes, in practice no. There are about 5.3 × 1036 different UUIDs v4. To have a 50% chance of one repeat you must make around 2.7 × 1018 of them, which is a billion identifiers every second for about 85 years. For one project the risk is far below the risk of a broken disk or a bug in the code. A good practice is still to keep a unique index on the column that holds the UUID.
Where a UUID is used
- Primary keys in a database. The client or the service creates the ID before the record is saved, so there is no need to ask the database for the next number. It is convenient for several servers, shards and apps that work offline. A UUID also does not show how many records you have, unlike
id=1042. - Idempotency keys. Some APIs (payment APIs, for example) accept a unique key in the header of a request. If the request is sent twice because of a network error, the server sees the same key and can ignore the repeat.
- Trace and correlation IDs. One identifier goes through all services and log lines of one request, so you can find the whole chain in the logs.
- File names and temporary links. An uploaded file saved as
uuid.jpgcannot overwrite another file, and its name cannot be guessed from the number of the previous one. - Test data, mocks and migrations. A quick way to get a unique value for a fixture, a user or an event.
UUID v4 or UUID v7?
UUID v7 is a newer version from the standard RFC 9562 (2024), which replaced RFC 4122. Its first 48 bits are a Unix timestamp in milliseconds, then come the version bits and random bits. RFC 9562 says that time-ordered UUIDs have better database-index locality than UUIDv4: new values are near each other in the index, and the difference to random inserts "can be one order of magnitude or more". If you only need a unique value and the order does not matter, v4 is enough. If the UUID is the primary key of a big table, look at v7. PostgreSQL 18 has the function uuidv7(). This tool makes both versions. A batch of v7 is always in growing order, also when many UUIDs are made in the same millisecond. A UUID v7 contains the time when it was made, so do not use it where the time must stay hidden.
How to make a UUID in code
- Java:
UUID.randomUUID().toString()fromjava.utilgives a v4. - JavaScript:
crypto.randomUUID()works in browsers (on a secure https page) and gives a v4 UUID. - Python:
str(uuid.uuid4())from the moduleuuid. - C#:
Guid.NewGuid(). SQL Server:NEWID(). PostgreSQL:gen_random_uuid().
UUID for Minecraft
Players ask about "Minecraft UUID" and "offline UUID" often, and it is a different thing from a random one. On a server in offline mode (online-mode=false) the UUID of a player is a UUID version 3 made from the MD5 hash of OfflinePlayer: and the player name (this is how the Minecraft Wiki describes it). Choose "Minecraft offline UUID" in the list above, type the nicknames (one on a line) and you get the offline UUIDs. For example, Notch gives b50ad385-829d-3141-a216-7e7d7539ba7f. The case of the letters matters: notch gives another UUID. A random v4 does not match any of them.
Good to know
- A UUID is an identifier, not a secret. Do not use it as a password or as the only protection of a private link. For passwords use the password generator.
- The letters can be small or capital, and the hyphens can be dropped in some systems. Both forms mean the same number, but keep one format in a project so that the strings compare equal.
- To get a short name for a page from a title use the slug generator, and to get a fingerprint of a text or a file the hash generator.
Similar tools
Password generator in your browser: random, in the style of Chrome, or easy to type on a phone, and a password checker. Nothing is sent.
Free online hash generator: MD5, SHA-1, SHA-256, SHA-384 and SHA-512 of a text or a file up to 2 GB, HMAC, checksum comparison and SRI values. Calculated in your browser, nothing is uploaded.
Slug generator online: turn a title into a clean URL slug. Cyrillic and accented letters are written in Latin, with stop words, a length limit and a list of titles at once.
Unix timestamp converter online: timestamp to date and date to timestamp, seconds or milliseconds, any time zone, the current Unix timestamp and code examples. Works in your browser.
Popular tools
Check who hosts a website: the IP address, the hosting company (ASN), the country and the city of the server. Free hosting checker for any domain.
Free IP lookup: find the country, city, coordinates and timezone of an IP address and its host name with a reverse IP (reverse DNS) lookup. IPv4 and IPv6.
Free DNS lookup online: check A, AAAA, CNAME, MX, NS, TXT, SOA and CAA records of any domain, plus its SSL certificate. Find out why a DNS lookup fails.
Check from the United States (New York) whether a website is online: HTTP status code and response time in milliseconds. A free US ping test for any URL.