What is the NUPKG file format?
A .nupkg file stores a standardized NuGet package used to distribute .NET libraries, tools, or application components. Underneath, .nupkg is a ZIP archive structured according to Open Packaging Conventions (OPC) - the same container family as .docx - and contains compiled .dll assemblies, a .nuspec metadata manifest, a [Content_Types].xml descriptor, and lib/ folders that organize assemblies by target framework moniker (e.g. net8.0, netstandard2.0).
What is NuGet?
NuGet is the package manager for the Microsoft .NET development platform, now stewarded by the .NET Foundation. It has been bundled by default with Visual Studio since the release of Visual Studio 2012 and is also available as a standalone CLI. NuGet supports .NET Framework, .NET Standard, and all modern .NET releases.
How are .nupkg files generated?
NuGet packages can be generated from a project folder using the dotnet pack command (the modern cross-platform approach) or the legacy nuget pack CLI. When using dotnet pack, package metadata is read directly from the .csproj project file, so a separate .nuspec manifest is no longer required - though one can still be supplied for advanced scenarios. The output is a .nupkg archive ready for distribution.
How to share a NuGet package?
The most popular way of sharing .nupkg files is publishing them to the nuget.org web platform. After registering an account, users upload their .nupkg file and provide a short description; each package undergoes automatic validation before being indexed and made available for download. Private feeds hosted on Azure Artifacts, GitHub Packages, or self-hosted servers are also common in enterprise environments. Companion .snupkg symbol packages can be published alongside a .nupkg to enable source-stepping in debuggers.
Security & safety
RISK: MEDIUMA .nupkg is data, not directly executable, but installing a package runs its code in your build and apps, so the supply-chain risk is real: malicious or typosquatted packages on nuget.org have been used to ship malware, and a package's tools/ install scripts or MSBuild targets can run during restore/build. Install packages only from trusted authors, watch for typosquatted ids, prefer packages with many downloads and source links, and consider signed packages and lock files. Merely inspecting a .nupkg by unzipping it is safe - the risk comes from installing and building against it.
Format details
in a nutshellPrograms that open NUPKG files
Technical details
deep spec| Container format | ZIP (Open Packaging Conventions / OPC) - same container family as .docx and .xlsx |
| Magic bytes | `50 4B 03 04` ("PK") - standard ZIP local file header at offset 0 |
| MIME type | `application/octet-stream` |
| Internal manifest | `.nuspec` XML file at the package root; declares Id, Version, Authors, dependencies, and target frameworks |
| Required OPC structure | `[Content_Types].xml`, `_rels/` folder, and at least one `.nuspec` manifest |
| Assembly path convention | `lib/<TFM>/` folders - e.g. `lib/net8.0/`, `lib/netstandard2.0/` - one per target framework moniker |
| Build tools | `dotnet pack` (SDK-style projects, cross-platform) or `nuget pack` (legacy NuGet CLI) |
| Public registry | nuget.org - over 500 000 unique package IDs; packages pass automated validation before indexing |
| Symbol companion format | `.snupkg` - separate archive holding `.pdb` symbol files for source-level debugging |
| Package signing | X.509 certificate signatures (author and repository); clients verify signatures on install |
| Target framework support | .NET Framework, .NET Standard, .NET 5-9 and later; multi-targeting supported in a single `.nupkg` |
| Version scheme | Semantic Versioning 2.0 (SemVer 2.0); pre-release labels supported (e.g. `-alpha`, `-rc.1`) |
| Package cache location | `%USERPROFILE%\.nuget\packages\` on Windows; `~/.nuget/packages/` on Linux and macOS |
| Dependency resolution | Full transitive dependency graph resolved at `dotnet restore`; optional lock file `packages.lock.json` for reproducible builds |
| Released | 2010 (NuGet 1.0) |
| Open standard | Yes · royalty-free |
| Specification | learn.microsoft.com |
NUPKG conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about NUPKG files.