GUID generator in C#
var id = Guid.NewGuid();Use Guid.NewGuid() for a new random GUID in .NET applications and tests.
Language-specific ways to create a GUID or UUID, plus a browser tool for batches, validation, conversion, and export.
Use your platform's native generator when an application creates identifiers at runtime. Use the online GUID generator when you need a reviewed batch for seed data, API fixtures, documents, SQL scripts, or manual testing. GUID and UUID usually refer to the same 128-bit identifier format.
For random identifiers, UUID v4 is a strong default. Generate values inside the application or database that owns production data, and preserve a unique constraint even though a correctly generated UUID collision is extremely unlikely.
var id = Guid.NewGuid();Use Guid.NewGuid() for a new random GUID in .NET applications and tests.
const id = crypto.randomUUID();Modern browsers and current Node.js releases provide crypto.randomUUID().
SELECT NEWID() AS guid;Use NEWID() for a random SQL Server uniqueidentifier value.
[guid]::NewGuid()This returns a new GUID value that can be stored in a variable or emitted by a script.
The online tool can produce up to 1,000 GUIDs at once, change casing and wrappers, convert UUID bytes into Base64 or URN form, and export TXT, CSV, or JSON. It also parses GUIDs pasted from logs and data exports.