Documentation, tutorials and shareable demos
Load versioned scripts, styles and example dependencies directly, so a single HTML file can demonstrate an interactive feature.
Choose packages with suitable browser builds and comply with their licenses.unpkg.com · United States (operator registration)
UNPKG serves files from public npm packages by URL. It suits documentation, interactive demos and small browser applications that do not need a bundler. The base CDN is free and requires no account. Additional tools cover browser modules, inline TypeScript/JSX and MCP. Optional Shield protection is in beta.
UNPKG is an open-source CDN for public npm packages, created by Michael Jackson. Its origins go back to his 2015 idea of exposing files inside npm package archives through ordinary URLs. Developers can load JavaScript, CSS and other package assets directly, making it useful for demos, documentation and applications that run without a build step. UNPKG operates independently of npm; package maintainers remain responsible for their content and licenses.
The project’s associated operator, UNPKG Foundation Inc., is an Arizona nonprofit corporation that also operates UNPKG Shield. The core CDN is free to use without an account, and its source code is available on GitHub. Content is delivered through Cloudflare’s edge network, backed by origins in several regions. Teams that require contractual service commitments should assess the core service’s as-is terms and lack of a contractual SLA before relying on it.
A UNPKG URL identifies a package, a version and a file path. It serves published public npm packages, including JavaScript, CSS, fonts and other packaged assets. Developers can use these resources without maintaining a separate asset bucket. Your own files must first be published to npm, and each package’s license still applies.
Use a complete version and file path when a page needs reproducible dependencies. Version ranges and latest resolve through a redirect and may select a different release later. Pinned URLs require an explicit update to receive patches. If the file path is omitted, UNPKG resolves package.json exports, main and package-specific unpkg entries; an arbitrary Node.js package is not automatically a browser script.
Cloudflare’s edge delivers the files, backed by origins in 11 regions across the Americas, Europe and Asia-Pacific, including Dallas, São Paulo, Amsterdam, London, Singapore, Tokyo and Sydney. Exact-version files can be cached for a year. Length and digest checks protect cached content, and damaged entries are evicted and fetched again.
UNPKG uses one edge provider and has no automatic failover across CDNs. The public file service is provided as-is, without a contractual SLA. Projects with strict availability, dependency-update or private-resource requirements need their own fallback, dependency management or separate deployment.
UNPKG’s public file CDN is free and requires no account. Package browsing, file and metadata access, browser modules and no-build tools remain subject to each npm package’s own license. The service distributes public npm packages; it is not an upload service for arbitrary website assets, private package hosting or a way to buy dedicated bandwidth.
Public npm file delivery requires no payment or payment method. Shield’s free Beta is available through an approved waitlist account. Discuss organization-wide deployments, service commitments and any future charges with the team.
The public CDN is an ongoing free service with no trial registration. Shield is currently a free private Beta: approved waitlist accounts can monitor up to 3 domains and 10 npm packages and run unlimited package security scans. Applicants must be at least 18 or the age of majority in their jurisdiction. There is no fixed trial period, and Beta features or access may change or end.
Load versioned scripts, styles and example dependencies directly, so a single HTML file can demonstrate an interactive feature.
Choose packages with suitable browser builds and comply with their licenses.Manage dependencies through an import map, use esm.unpkg.com where conversion is needed, and use /run for inline TypeScript or JSX.
Framework build pipelines, complex dependency graphs and compatibility remain project responsibilities.Use metadata and MCP to check versions, files and dependencies. Optional Shield adds visibility for verified domains and enforcement when enabled.
Beta approval, domain verification and protection policies are separate from anonymous file access.Start with a small set of browser-ready dependencies and decide how versions will be pinned, updated and replaced during an outage. Public npm delivery offers a direct integration path. Private registries, arbitrary origin pulls and contractual availability requirements need a separate service or deployment plan.
Explore products by use case: what they do, how to use them and whether they are billed separately.
Fetch files from public npm packages using a package name, version and path. Scoped packages, version ranges, dist-tags, export subpaths and conditions are supported. The base CDN serves published package contents under their respective licenses.
Browse a package directory with a trailing slash, or append ?meta for paths, byte sizes, MIME types and SHA-256 integrity values. Tools can discover assets and generate SRI attributes. A matching digest verifies bytes, rather than judging whether code is safe.
Resolve and convert npm packages into browser-ready ES modules and rewrite dependency URLs. Options cover syntax targets, dependency overrides, development mode and CSS modules. The default target is ES2022; applications still need to check package and browser compatibility.
Finds text/ts, text/jsx and text/tsx scripts in a page, transforms them through the module service and inserts executable modules. Syntax targets and JSX sources are configurable. Useful for demos and small pages without separate generated script files.
Provides package resolution, file discovery, dependency audits, import-map generation and validation, plus malware and vulnerability checks for named package versions. General tools work anonymously. Access to your own domains and policies requires an approved Shield account. Tool inputs and results are logged; do not submit secrets or private source code.
Monitors npm releases and provides dependency visibility for connected domains. Domains begin in monitoring mode. After enforcement is enabled, affected versions can be replaced with a known-good release or blocked at the edge. Policies can change the returned version, so plan them alongside application tests and integrity requirements.
The official repository includes the file CDN Worker, package browser, module conversion Worker and Bun file origin, using pnpm and Bun. Deployment examples use Fly.io for origins and Cloudflare for Workers. You supply the accounts, domains, configuration and operations.
Developers loading public JavaScript, CSS and other npm package files
Use file URLs directly, with no registration, subscription or payment.
Site teams evaluating npm dependency monitoring and edge defense
Waitlist approval is required. Access is free during the Beta, with no fixed trial period.
Organizations needing shared identity, policies, audit and support arrangements
Confirm the available configuration, contract scope and charges with the team. Shield is currently in Beta.
| Product | Allowance / base fee | Usage prices |
|---|---|---|
| Public file delivery | Files in public npm packages are free to access, without dedicated capacity or a contractual availability commitment. | Free |
| Shield Beta allowance | Approved accounts include up to 3 domains, 10 packages and unlimited package security scans during the Beta. | Free |
| Self-hosted deployment | The MIT-licensed code can be deployed independently.Configure the file origin and Workers and cover the chosen infrastructure and operating costs. | Costs vary |
The public CDN is provided as is, without a contractual SLA. Shield’s free Beta also offers no uptime or response-time guarantee. Automated detections can be wrong or miss threats; start in monitoring mode and choose whether to enable automatic defense for each domain. Agree organization-wide features and service commitments separately; Beta access does not include an enterprise SLA. The self-hosted code is MIT-licensed, while the operator pays for cloud resources, transfer, storage, domains and maintenance.
URL delivery, metadata and module tools keep integration direct, while exact versions make dependency choices explicit.
The base service has no contractual SLA or failover across CDNs. Pinned versions need deliberate updates, while floating versions can introduce new release risks. Package licensing, browser compatibility and dependency fallbacks remain your responsibility. Shield is in beta, with separate eligibility and policy decisions.
Explore UNPKG products, use cases and buying advice