Soenneker.Data.ZipCode
4.0.1130
Prefix Reserved
dotnet add package Soenneker.Data.ZipCode --version 4.0.1130
NuGet\Install-Package Soenneker.Data.ZipCode -Version 4.0.1130
<PackageReference Include="Soenneker.Data.ZipCode" Version="4.0.1130" />
<PackageVersion Include="Soenneker.Data.ZipCode" Version="4.0.1130" />
<PackageReference Include="Soenneker.Data.ZipCode" />
paket add Soenneker.Data.ZipCode --version 4.0.1130
#r "nuget: Soenneker.Data.ZipCode, 4.0.1130"
#:package Soenneker.Data.ZipCode@4.0.1130
#addin nuget:?package=Soenneker.Data.ZipCode&version=4.0.1130
#tool nuget:?package=Soenneker.Data.ZipCode&version=4.0.1130
Soenneker.Data.ZipCode
A packaged newline-delimited list of five-digit United States ZIP codes.
Installation
dotnet add package Soenneker.Data.ZipCode
The package copies this file to the consuming application's output directory:
Resources/zipcodes.txt
It contains one five-character ZIP code per line. The package provides data only—there is no service, parser, address validator, or dependency-injection registration.
Load the ZIP-code set
string path = Path.Combine(
AppContext.BaseDirectory,
"Resources",
"zipcodes.txt");
HashSet<string> zipCodes = File.ReadLines(path)
.Select(static line => line.Trim())
.Where(static line => line.Length == 5)
.ToHashSet(StringComparer.Ordinal);
Keep ZIP codes as strings so leading zeroes are preserved:
bool exists = zipCodes.Contains("00601");
For ZIP+4 input, validate the full input according to your application's rules and look up only the first five digits. Membership in this file does not validate the four-digit delivery segment.
Operational guidance
The list is a snapshot shipped with the installed package version. Updating the NuGet package updates the output asset; deployed applications do not download changes automatically.
A matching ZIP code indicates only that the five-digit code appears in the dataset. It does not prove that an address exists, is deliverable, belongs to a claimed city or state, or is current. Use an address-validation service when delivery accuracy matters.
Loading the file into a HashSet<string> provides fast repeated lookup while retaining the complete list in memory. The data is small enough for many server applications, but occasional or constrained consumers can scan the file or build a different index.
| 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
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Soenneker.Data.ZipCode:
| Package | Downloads |
|---|---|
|
Soenneker.Validators.ZipCode.Exists
Validates US ZIP codes against a packaged data snapshot |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.1130 | 37 | 10/20/2026 |
| 4.0.1017 | 3,001 | 7/1/2026 |
| 4.0.988 | 903 | 6/2/2026 |
| 4.0.957 | 499 | 5/2/2026 |
| 4.0.926 | 497 | 4/1/2026 |
| 4.0.806 | 1,007 | 3/2/2026 |
| 4.0.780 | 566 | 2/4/2026 |
| 4.0.754 | 490 | 1/9/2026 |
| 4.0.753 | 203 | 1/8/2026 |
| 4.0.748 | 364 | 1/3/2026 |
| 4.0.716 | 1,197 | 12/2/2025 |
| 4.0.687 | 582 | 11/3/2025 |
| 3.0.655 | 478 | 10/2/2025 |
| 3.0.626 | 443 | 9/3/2025 |
| 3.0.622 | 359 | 8/30/2025 |
| 3.0.621 | 313 | 8/29/2025 |
| 3.0.618 | 328 | 8/26/2025 |
| 3.0.596 | 468 | 8/4/2025 |
| 3.0.563 | 397 | 7/2/2025 |
| 3.0.529 | 490 | 6/2/2025 |