UNPKG
unpkg.com
What it is
UNPKG is a free CDN for files published on npm, with package files addressed by URLs containing a package name, version, and file path. A URL can specify an exact version, an npm dist-tag, or a semver range; when the version is omitted, UNPKG resolves the latest tag. If the file path is omitted, it resolves the package's default entry point, including package exports and subpaths. For browser apps, import maps can load JavaScript modules without a build step. The esm.unpkg.com service can transform TypeScript and JSX, bundle package internals, and rewrite dependency imports to pinned UNPKG URLs for modern browsers. Module URLs support options including targets, export conditions, aliases, minification, source maps, and raw files. Adding ?meta to a package root or subdirectory returns JSON metadata with file paths, sizes, types, and subresource integrity values. UNPKG says npm files become available within minutes of publication. Its files run through Cloudflare's global edge network and Workers, and versioned URLs are cached. The project describes itself as open source and says it is not affiliated with or supported by npm.
Spec sheet
- What it does
- UNPKG is a fast, global CDN for loading any file published on npm using a URL.Read 9 Oct 2026 · unpkg.com
- Free plan
- YesRead 24 Sep 2026 · unpkg.com
- Support
- The site directs questions or concerns to @unpkg and says not to contact npm for UNPKG support.Read 9 Oct 2026 · unpkg.com
- Browser apps
- UNPKG supports loading JavaScript modules directly in browser apps with import maps and without a build step.Read 9 Oct 2026 · unpkg.com
- Browser modules
- esm.unpkg.com transforms TypeScript and JSX when needed, bundles package internals, rewrites dependency imports to permanent URLs, and serves browser-loadable modules.Read 9 Oct 2026 · unpkg.com
- Caching
- UNPKG says it runs on Cloudflare’s global edge network and caches files by permanent URLs containing the npm package version.Read 9 Oct 2026 · unpkg.com
- Cloudflare infrastructure
- UNPKG says it runs on Cloudflare's global edge network and Cloudflare Workers, serving requests from hundreds of locations worldwide.Read 4 Oct 2026 · unpkg.com
- File resolution
- When a file path is omitted, UNPKG resolves the package’s default entry point, including support for package exports and subpaths.Read 9 Oct 2026 · unpkg.com
- Inline scripts
- The /run helper transforms inline TypeScript, JSX, and TSX scripts through esm.unpkg.com and inserts executable module scripts.Read 9 Oct 2026 · unpkg.com
- Integrity metadata
- The metadata example includes a SHA-256 subresource integrity value for each file.Read 4 Oct 2026 · unpkg.com
- Metadata
- Appending ?meta to a package root or subdirectory returns JSON file metadata, including paths, sizes, types, and subresource integrity values.Read 9 Oct 2026 · unpkg.com
- Metadata API
- Appending ?meta to a package root or subdirectory returns JSON metadata including file paths, sizes, types, and subresource integrity values.Read 4 Oct 2026 · unpkg.com
- Module options
- Browser module URLs support options including output target, development mode, custom conditions, dependency overrides, aliases, minification, and source maps.Read 9 Oct 2026 · unpkg.com
- No-build apps
- The site describes loading JavaScript modules directly into browser apps with import maps, without a bundler.Read 4 Oct 2026 · unpkg.com
- Nobuild use cases
- The maker describes UNPKG as suited to small projects, prototypes, and other browser apps that need to run without a build pipeline.Read 9 Oct 2026 · unpkg.com
- Notable cache behavior
- URLs using an unresolved version or range redirect to a resolved version, while the site recommends full version numbers and file paths for the best chance of a cache hit.Read 9 Oct 2026 · unpkg.com
- npm integration
- UNPKG mirrors npm packages, and the site says files become available on unpkg.com within minutes of publication to npm.Read 4 Oct 2026 · unpkg.com
- Package exports
- UNPKG supports the full package exports spec, including subpaths, and supports custom export conditions through a query parameter.Read 4 Oct 2026 · unpkg.com
- Package updates
- The site says npm files become available on UNPKG within minutes of publication.Read 9 Oct 2026 · unpkg.com
- Package versions
- Package URLs support exact versions, npm dist-tags, and semver ranges, and use the latest tag when no version is specified.Read 9 Oct 2026 · unpkg.com
- Project and affiliation
- UNPKG describes itself as an open source project from @mjackson and says it is not affiliated with or supported by npm.Read 9 Oct 2026 · unpkg.com
- Project status
- UNPKG describes itself as an open source project and says it is not affiliated with or supported by npm.Read 4 Oct 2026 · unpkg.com
- Version resolution
- Package URLs can use an exact version, an npm dist-tag, or a semver range; if no version is specified, UNPKG uses the latest tag.Read 4 Oct 2026 · unpkg.com
Plans and prices
Strong points and limits
Strong points
- Free to use.
- Supports exact versions, tags, and semver ranges.
- Can load modules with import maps.
- ?meta returns file and integrity metadata.
- npm files appear within minutes of publication.
Limits
- Version or range URLs may redirect to a resolved version.
- The project is not affiliated with or supported by npm.
Who it suits
UNPKG may suit developers serving npm package files or loading JavaScript modules directly in browser apps. Its no-build approach is also described for small projects and prototypes that do not need a build pipeline.
Verdict
UNPKG provides direct access to npm files and browser modules, with package resolution and metadata options. Use full versions and file paths for the best chance of a cache hit.
Where Specifiction places it
- CDN services#13 of 358.1
- CDN Software#20 of 337.8