Generate a GUID

Press generate for a fresh GUID.

Free · Runs in your browser · Your text is never uploaded

A unique identifier code made of random characters

New GUID in one click

Each press creates a new random version 4 GUID. For code, you can usually paste it straight into a variable, config or database row.

PowerShell and C#

In PowerShell use [guid]::NewGuid(); in C# use Guid.NewGuid(). This page is handy when you just need one fast.

Where GUIDs are used

Generating one on demand is common while writing unit tests, seeding a database or filling in an XML manifest that needs a unique product or component code.

How to make one in code

PowerShell: [guid]::NewGuid(). C#: Guid.NewGuid(). SQL Server: NEWID(). JavaScript: crypto.randomUUID(). Python: uuid.uuid4(). PostgreSQL: gen_random_uuid().

Format and safety

A GUID is 32 hexadecimal digits in the pattern 8-4-4-4-12. Windows sometimes adds curly braces and uppercase letters, which do not change the value. GUIDs identify things; they are not passwords. Read the full comparison in UUID vs GUID explained.

Need more options? Open the full UUID Generator.

Related guides

Frequently asked questions

How do I generate a GUID?

Press the button and copy the value.

Will two GUIDs ever match?

Practically never.