NathanTools

GUID / UUID Generator

Copy a fresh GUID below, or generate up to 1,000 random (v4), time-ordered (v7) or name-based (v5) UUIDs, ULIDs or NanoIDs in the format you need.

100% free No sign-up Works on any device

Report a bug

GUID / UUID Generator

Version
Format
Encoding

GUIDs

Updated November 2026 · Follows RFC 9562 · Generated in your browser

How to generate a GUID

  1. A new GUID appears at the top as soon as the page loads. Press Copy to use it, or the arrow to make a new one.
  2. Need more? Drag How many to create up to 1,000 at once, then Copy all or Download them as a text file.
  3. Pick the version: v4 for random IDs, v7 for database keys that sort by creation time, or v5 to turn a name into the same UUID every time. ULID and NanoID give shorter, URL-safe IDs.
  4. Match the format your code expects: uppercase and braces for Windows and .NET, no hyphens for compact storage, quotes and commas to paste into an array or SQL IN (…) list.
  5. Need it shorter or safe for a URL? Set Encoding to Base64 or Base64url to encode the 16 raw bytes, or URL-encoded to escape the braces and quotes.

What is a GUID?

A GUID (globally unique identifier), also called a UUID, is a 128-bit number used to label something without asking a central authority for the next free number. It's written as 32 hexadecimal digits in five groups, 8-4-4-4-12:

f47ac10b-58cc-4372-a567-0e02b2c3d479

Two digits carry meaning. The first digit of the third group (4 above) is the version, which says how the GUID was made. The first digit of the fourth group (a) is the variant; 8, 9, a or b means the standard layout. Everything else is random bits, a timestamp or a hash, depending on the version.

UUID versions compared

VersionBuilt fromSortable?Typical use
v1Timestamp + device MAC addressNoLegacy systems; leaks the machine and time
v3MD5 of a namespace + nameNoLegacy; use v5 instead
v4122 random bitsNoGeneral-purpose IDs, the most common choice
v5SHA-1 of a namespace + nameNoThe same ID for the same name, across systems
v6Reordered v1 timestampYesUpgrading v1 systems
v7Unix time in milliseconds + random bitsYesDatabase primary keys, event and log IDs
v8Your own layoutDependsCustom or experimental formats

Versions 6, 7 and 8 were added by RFC 9562 in May 2024, which replaced the original RFC 4122. If you aren't sure, use v4. If the IDs will be a database's primary key, use v7: because they increase over time, new rows are written next to each other in the index instead of all over it, which keeps inserts fast and indexes small.

Common GUID formats

FormatExampleWhere you see it
Standardf47ac10b-58cc-4372-a567-0e02b2c3d479Most languages, APIs, PostgreSQL
UppercaseF47AC10B-58CC-4372-A567-0E02B2C3D479SQL Server, Windows tools
Braces{F47AC10B-58CC-4372-A567-0E02B2C3D479}Windows Registry, COM, Visual Studio
No hyphensf47ac10b58cc4372a5670e02b2c3d479Compact storage, file names
URNurn:uuid:f47ac10b-58cc-4372-a567-0e02b2c3d479XML and standards documents

All of these are the same value. GUID comparison is case-insensitive, and our GUID validator accepts every format above.

Base64, Base64url and URL-encoded GUIDs

The Encoding option changes how the 128 bits are written, not the ID itself. Base64 and Base64url encode the 16 raw bytes in standard (RFC 9562) byte order, so the result is shorter than the 36-character text form:

EncodingExampleLengthUse it for
Base649HrBC1jMQ3KlZw4CssPUeQ==24JSON payloads, binary columns shown as text
Base64url (RFC 7515)9HrBC1jMQ3KlZw4CssPUeQ22URLs, file names, JWT claims: no +, / or padding
URL-encoded%7BF47AC10B-58CC-4372-A567-0E02B2C3D479%7DvariesA braced or quoted GUID inside a query string

.NET's Guid.ToByteArray() stores the first three groups little-endian, so Convert.ToBase64String(guid.ToByteArray()) gives a different string for the same GUID. Use guid.ToByteArray(bigEndian: true) (.NET 8+) to match the output here.

ULID and NanoID: shorter alternatives

A ULID holds the same 128 bits as a UUID (a 48-bit millisecond timestamp and 80 random bits) in 26 characters of Crockford Base32, such as 01JCXQ7Z8K4W3N5R2T6V9Y0B1D. It sorts by time like v7 and needs no escaping in a URL. A NanoID is just random characters, 21 by default from a 64-symbol URL-safe alphabet, which gives 126 random bits: about as many as a v4 UUID in 15 fewer characters. Use the dedicated pages for a custom alphabet or to convert a ULID to a UUID.

How unique is a GUID?

A v4 GUID has 122 random bits, giving 5.3 × 1036 possible values. By the birthday problem, you'd need to generate about 2.7 quintillion GUIDs before there's even a 50% chance that two are the same. At a billion GUIDs a second, that takes around 86 years. In real systems a duplicate is far more likely to come from a bug, such as a weak random generator or copying a value twice, than from chance. This page uses the browser's cryptographically secure generator, crypto.getRandomValues.

Generate a GUID in code

LanguageRandom (v4)Time-ordered (v7)
JavaScript (browser, Node.js)crypto.randomUUID()uuid package: v7()
Pythonuuid.uuid4()uuid.uuid7() (Python 3.14+)
C# / .NETGuid.NewGuid()Guid.CreateVersion7() (.NET 9+)
JavaUUID.randomUUID()A library such as java-uuid-generator
Gouuid.New() (google/uuid)uuid.NewV7() (google/uuid)
PostgreSQLgen_random_uuid()uuidv7() (PostgreSQL 18+)
SQL ServerNEWID()NEWSEQUENTIALID() (sequential, not v7)

Use one ID for the whole lifetime of a record

Suppose a customer submits a support form and your system writes the request to a database, then queues a notification. Generate the identifier once when the request is created. Pass that same value into the database row, the queued message and the receipt shown to the customer. If the notification is retried, keeping the existing ID lets you tie the retry to the original request. Generating a fresh value at every step makes it harder to tell which records belong together.

Store the ID with a uniqueness constraint where your data model requires unique rows. Decide separately how to recognize duplicate submissions. A unique UUID tells you that two identifiers are different. A person can submit the same form twice and still receive two perfectly valid UUIDs.

Check which version the application expects before copying a result from this page. A test record that exercises a random UUID path should use v4. If an integration checks for the time-ordered layout in v7, use a v7 sample and read it using that version's rules. Test the canonical lowercase, hyphenated form first if you control both sides of an HTTP interface.

Check the interchange format before debugging the ID

If one system sends a hyphenated UUID and another sends Base64, confirm that the contract describes the byte order as well as the spelling. Start with one fixed example and decode it on both sides. Compare the canonical UUID text after decoding. This isolates a byte-order mismatch from a problem in how either service generates new IDs.

Settle on a format for the boundary between services and keep the native UUID type where your database supports the operations you need. Some storage engines sort UUIDs differently. Before adopting v7 for index locality, observe the actual sort order and write pattern in your target database with representative records.

Treat IDs in public URLs as labels for records. If a receipt, invoice or user profile requires permission, verify that the application checks the signed-in user's access every time it loads the object. UUID format validation only answers questions about the identifier's shape and version. A request can carry a valid identifier and still lack permission to read the associated record. RFC 9562 UUID specification.

Frequently asked questions

None in practice. UUID (universally unique identifier) is the name used in the standard, RFC 9562. GUID (globally unique identifier) is Microsoft's name for the same 128-bit value, used in Windows, .NET and SQL Server. A GUID made here works anywhere a UUID is expected.

In theory yes, in practice no. A version 4 UUID has 122 random bits. You would need to generate about 2.7 quintillion (2.7 × 10^18) of them for a 50% chance of a single duplicate, which is about 86 years at a billion per second.

Prefer v7. It starts with a timestamp, so new rows are added at the end of the index instead of at random positions. That keeps B-tree indexes compact and inserts fast. Use v4 when you don't want the creation time to be visible in the ID.

A v5 UUID is calculated from a namespace and a name with SHA-1, so the same input always produces the same UUID. It's useful when several systems need to agree on an ID for, say, a domain name or URL without sharing a database. It isn't random and shouldn't be used as a secret.

v4 GUIDs here come from your browser's cryptographically secure random generator, so they are unpredictable. Even so, use a purpose-built token (for example 32 random bytes) for passwords, session IDs or API keys, and never use v5 or v7 where the ID must stay secret.

No. They are generated in your browser with crypto.getRandomValues and the Web Crypto API. Nothing is sent to our server or logged.

Comments

No comments yet.

Share this tool

GUID / UUID Generator

Favorites

Drag to reorder, or use the arrows. Categories and the tools inside them can both be moved.

Saved in this browser. Sign in to keep them on every device.

Esc
↑ ↓ to moveEnter to open