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
                    
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="Soenneker.Data.ZipCode" Version="4.0.1130" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Data.ZipCode" Version="4.0.1130" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Data.ZipCode" />
                    
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 Soenneker.Data.ZipCode --version 4.0.1130
                    
#r "nuget: Soenneker.Data.ZipCode, 4.0.1130"
                    
#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 Soenneker.Data.ZipCode@4.0.1130
                    
#: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=Soenneker.Data.ZipCode&version=4.0.1130
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Data.ZipCode&version=4.0.1130
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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 0 10/20/2026
4.0.1017 2,992 7/1/2026
4.0.988 902 6/2/2026
4.0.957 498 5/2/2026
4.0.926 496 4/1/2026
4.0.806 1,006 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
Loading failed