Dosaic.Extensions.Sqids
1.2.6
dotnet add package Dosaic.Extensions.Sqids --version 1.2.6
NuGet\Install-Package Dosaic.Extensions.Sqids -Version 1.2.6
<PackageReference Include="Dosaic.Extensions.Sqids" Version="1.2.6" />
<PackageVersion Include="Dosaic.Extensions.Sqids" Version="1.2.6" />
<PackageReference Include="Dosaic.Extensions.Sqids" />
paket add Dosaic.Extensions.Sqids --version 1.2.6
#r "nuget: Dosaic.Extensions.Sqids, 1.2.6"
#:package Dosaic.Extensions.Sqids@1.2.6
#addin nuget:?package=Dosaic.Extensions.Sqids&version=1.2.6
#tool nuget:?package=Dosaic.Extensions.Sqids&version=1.2.6
Dosaic.Extensions.Sqids
Dosaic.Extensions.Sqids is an extension library that provides methods to convert strings to and from Sqid format using the Sqids library.
Installation
To install the nuget package follow these steps:
dotnet add package Dosaic.Extensions.Sqids
or add as package reference to your .csproj
<PackageReference Include="Dosaic.Extensions.Sqids" Version="" />
Usage
The extension provides simple methods to convert strings to and from Sqid format.
Basic Conversion
Convert a string to a Sqid:
using Dosaic.Extensions.Sqids;
string originalString = "HelloWorld";
string sqidString = originalString.ToSqid();
Convert a Sqid back to the original string:
using Dosaic.Extensions.Sqids;
string sqidString = "kKs7PVdXUYnH"; // Example sqid
string originalString = sqidString.FromSqid();
Custom Encoder
You can also use a custom encoder for special use cases:
using Dosaic.Extensions.Sqids;
using Sqids;
var customEncoder = new SqidsEncoder<char>(new SqidsOptions
{
Alphabet = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",
MinLength = 8
});
string originalString = "HelloWorld";
string sqidString = originalString.ToSqid(customEncoder);
string decodedString = sqidString.FromSqid(customEncoder);
Default Configuration
By default, the extension uses the following configuration:
- Alphabet: "kKsW7PVdXUYnHgQ6rujl0GepfNzB2qZ9bC83IyDmOAtJ4hcSvM1Roaw5LxEiTF"
- Minimum Length: 10
You can modify the default encoder if needed:
using Dosaic.Extensions.Sqids;
using Sqids;
SqidExtensions.Encoder = new SqidsEncoder<char>(new SqidsOptions
{
Alphabet = "yourCustomAlphabet",
MinLength = 12
});
Use Cases
Sqids are useful for:
- Creating URL-friendly identifiers
- Obfuscating sequential IDs
- Generating short, unique string identifiers
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- Sqids (>= 3.2.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Dosaic.Extensions.Sqids:
| Package | Downloads |
|---|---|
|
Dosaic.Plugins.Persistence.S3
A plugin-first dotnet framework for rapidly building anything hosted in the web. |
|
|
Dosaic.Plugins.Persistence.VaultSharp
A plugin-first dotnet framework for rapidly building anything hosted in the web. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.2.6 | 89 | 2/19/2026 |
| 1.2.5 | 93 | 2/17/2026 |
| 1.2.4 | 118 | 2/13/2026 |
| 1.2.3 | 122 | 1/27/2026 |
| 1.2.2 | 308 | 12/16/2025 |
| 1.2.1 | 293 | 12/16/2025 |
| 1.2.0 | 439 | 12/11/2025 |
| 1.1.21 | 470 | 12/10/2025 |
| 1.1.20 | 436 | 11/18/2025 |
| 1.1.19 | 330 | 11/11/2025 |
| 1.1.18 | 229 | 10/14/2025 |
| 1.1.17 | 225 | 10/1/2025 |
| 1.1.16 | 254 | 9/25/2025 |
| 1.1.15 | 240 | 9/24/2025 |
| 1.1.14 | 232 | 9/24/2025 |
| 1.1.13 | 239 | 9/24/2025 |
| 1.1.12 | 359 | 9/16/2025 |
| 1.1.11 | 201 | 7/18/2025 |
| 1.1.10 | 184 | 7/18/2025 |
| 1.1.9 | 243 | 7/8/2025 |