Developer UUID tools
SQL GUID Generator
Generate GUIDs for SQL Server scripts, seed data, migrations, and uniqueidentifier examples.
SQL GUID generator
Create GUID values for SQL Server inserts, tests, fixtures, and migration scripts.
123e4567-e89b-42d3-a456-426614174000 123e4567-e89b-42d3-a456-426614174001 123e4567-e89b-42d3-a456-426614174002 123e4567-e89b-42d3-a456-426614174003 123e4567-e89b-42d3-a456-426614174004 123e4567-e89b-42d3-a456-426614174005 123e4567-e89b-42d3-a456-426614174006 123e4567-e89b-42d3-a456-426614174007 123e4567-e89b-42d3-a456-426614174008 123e4567-e89b-42d3-a456-426614174009
Generate 1 to 1000 IDs per batch.
Generated values stay in your browser. This page does not send UUIDs or GUIDs to a server for generation.
SQL Server NEWID() example
SQL Server can generate a GUID with NEWID(). The usual column type for GUID values is uniqueidentifier.
SELECT NEWID() AS id;
CREATE TABLE ExampleItems (
id uniqueidentifier NOT NULL DEFAULT NEWID(),
name nvarchar(100) NOT NULL
);Storing GUIDs in SQL Server
Use uniqueidentifier for SQL Server GUID columns rather than storing GUIDs as arbitrary text. This keeps the type explicit and avoids length mistakes.
Random GUIDs can affect clustered index locality. Review your indexing strategy when GUIDs are used as primary keys at high write volume.
Common SQL GUID mistakes
Do not use varchar columns that are too short. Do not assume GUID strings and binary storage sort the same way. Avoid defaulting every business identifier to GUID without considering query patterns.
FAQ
How do I generate a GUID in SQL Server?+
Use SELECT NEWID() or a DEFAULT NEWID() constraint on a uniqueidentifier column.
What is uniqueidentifier?+
uniqueidentifier is SQL Server's native type for GUID values.
Should a SQL Server GUID be clustered?+
It depends on write volume and access patterns. Random GUID clustering can fragment indexes, so review the table design.