Ozcorps.UuidV8 1.0.0

dotnet add package Ozcorps.UuidV8 --version 1.0.0
                    
NuGet\Install-Package Ozcorps.UuidV8 -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Ozcorps.UuidV8" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Ozcorps.UuidV8" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Ozcorps.UuidV8" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Ozcorps.UuidV8 --version 1.0.0
                    
#r "nuget: Ozcorps.UuidV8, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Ozcorps.UuidV8@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Ozcorps.UuidV8&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Ozcorps.UuidV8&version=1.0.0
                    
Install as a Cake Tool

Ozcorps.UuidV8

RFC 9562 UUIDv8 generator for .NET. Produces time-ordered, monotonic GUIDs with a cryptographically random tail.

Bit layout

Without NodeId (default):
┌────────────────────────┬─────┬──────────────┬──────┬─────────────────────────────────────────────────────────────┐
│     48-bit unix_ts_ms  │ v=8 │  12-bit seq  │ 0b10 │                       62-bit random                        │
└────────────────────────┴─────┴──────────────┴──────┴─────────────────────────────────────────────────────────────┘

With NodeId:
┌────────────────────────┬─────┬──────────────┬──────┬────────────────┬────────────────────────────────────────────┐
│     48-bit unix_ts_ms  │ v=8 │  12-bit seq  │ 0b10 │ 10-bit node_id │                  52-bit random             │
└────────────────────────┴─────┴──────────────┴──────┴────────────────┴────────────────────────────────────────────┘
  • 48 bits — Unix timestamp in milliseconds (time-ordered)
  • 4 bits — version = 8
  • 12 bits — monotonic sequence counter (up to 4 096 IDs/ms per node before auto-advancing the clock)
  • 2 bits — variant = 0b10 (RFC 4122 / RFC 9562)
  • 10 bits — optional node identifier (0–1023), guarantees cross-machine uniqueness
  • 52 / 62 bits — cryptographically random (RandomNumberGenerator)

Installation

dotnet add package Ozcorps.UuidV8

Usage

Standalone (no DI)

// Default options — no NodeId, 62 random bits
Guid id = UuidV8Generator.NewId();

// Per-call options
Guid id = UuidV8Generator.NewId(new UuidV8Options { NodeId = 1 });

Configure once at startup

UuidV8Generator.Configure(new UuidV8Options { NodeId = 1 });

// Everywhere in your app:
Guid id = UuidV8Generator.NewId();

With dependency injection

Use the Ozcorps.UuidV8.EntityFrameworkCore package for IServiceCollection integration.

NodeId

NodeId is a 10-bit value (0–1023). Assign a unique value per machine or application instance to guarantee global uniqueness across nodes. When 0 (default), those bits are filled with random data — safe for single-node or low-collision scenarios.

Thread safety

UuidV8Generator is fully thread-safe. The internal sequence counter and timestamp are protected by a lock.

Compatibility

Targets net8.0 — works on .NET 8, 9, and 10+.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Ozcorps.UuidV8:

Package Downloads
Ozcorps.UuidV8.EntityFrameworkCore

Entity Framework Core integration for Ozcorps.UuidV8. Provides a ValueGenerator and ModelBuilder extensions.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 105 3/5/2026