esm.sh

esm.sh ·

Transforms packages from npm, JSR, GitHub and pkg.pr.new into ES modules for URL imports in browsers and Deno, with a public CDN and an MIT-licensed server for self-hosting.

Public module CDNJavaScriptES modulesDenoOpen source
Service marketsMultiple regions
BillingFree
Free trialNot supported
Payments
Not verified
Overall rating
★★★★★★★★★★3.5

On-site interest
3,550index
01

Company introduction

About esm.sh
Founded
2020 (project origin)
Co-founders
Je Xia (@ije)
Headquarters
Not publicly specified
Listing
Open-source project

An open-source project built around native JavaScript modules

Created and maintained by developer Je Xia (@ije), esm.sh traces its public repository to 2020. The project lets developers use JavaScript packages through URLs, reducing the installation and local build work needed to get started with native ES modules in browsers and Deno.

Its code is available under the MIT license in the esm-dev organization. Developers can use the public esm.sh service or run the server on their own infrastructure to manage module builds and caching for their applications.

Public delivery and self-hosted operation

The public CDN delivers modules through Cloudflare and supports packages or source files from npm, JSR, GitHub and pkg.pr.new. Dependency versions, build targets and transformation options help connect package resolution with browser-ready delivery, making the service useful for online examples, lightweight sites, interactive tools and projects using import maps.

The project accepts support through GitHub Sponsors and Open Collective, with Open Source Collective acting as its fiscal host on Open Collective. GitHub Issues is the main route for bug reports. Teams that need a private npm registry, their own access controls or a separate operating environment can self-host the server and manage the infrastructure themselves.

Module builds and TSX integration

Import URLs can select package versions, subpaths, dependency versions, aliases and build targets. Default builds process internal modules and dependencies; import maps and external options help control shared dependencies. The standalone option includes external dependencies in one file but excludes peerDependencies. Export-based tree shaking does not work with CommonJS modules. Raw mode serves source files without ES-module transformation.

esm.sh/tsx handles JSX, TS and TSX scripts embedded in HTML, making it useful for interactive examples, teaching and lightweight prototypes. Outside localhost, script source is sent to the server for compilation and caching; local development uses a browser-side transformer. Choose the workflow according to source sensitivity and configure a matching JSX runtime.

Versions, runtimes and self-hosting

Browsers need native ES-module support. Deno can use type-declaration headers and runtime-specific compatibility handling. The current project README does not list Node.js or Bun as supported clients, and browser-side Node shims do not provide a complete filesystem or networking runtime. Packages that require native extensions, particular Node APIs or unusual bundling behavior need validation in the intended environment.

An initial request may trigger a build, and large packages can time out. Pin package and critical dependency versions, targets and build options before release, and retain validated resources for rollback. The current purge mechanism can rebuild exact versions; legacy build-version prefixes and pin parameters no longer provide their former build-locking behavior. Projects that require stable bytes or offline operation can include dependencies in their own builds, archives or self-hosted service.

The public esm.sh service does not support private npm packages. Teams that need private registries, access controls or their own cache and storage configuration can deploy the MIT-licensed server, configure npm credentials and scoped registries, and use filesystem or S3-compatible storage. Source and Docker deployment instructions are available; infrastructure, edge caching and maintenance belong to the operator.

Self-hosted operators need to keep the server, Deno runtime and host updated, and isolate private registry and storage credentials. Review package-name, path and loader handling against the project’s security advisories before deployment. Dependencies delivered through the public CDN also belong in version review and integrity management.

02

Who is this provider for?

Interactive examples and lightweight frontends

Module URLs and import maps suit demos, teaching material and small applications that need dependencies before a full bundling setup.

Pin package versions and dependency mappings, and check browser API requirements. Node.js built-ins do not become available in a browser through module conversion.

Deno applications using remote imports

Package transformation and type declaration links support existing Deno applications built around URL imports.

Check dependency lockfiles before deployment. Projects requiring reproducible builds should consider archiving dependencies or the runtime’s native npm imports.

Teams controlling their module build service

A self-hosted server can connect to private npm registries while the team manages storage, domains and access controls.

Plan for upgrades, credential isolation, capacity and monitoring, including review of the project’s security advisories.

esm.sh distributes JavaScript packages and modules rather than accelerating arbitrary origin sites or delivering video. Current documentation targets browsers and Deno; Node.js and Bun are not supported as direct client environments.

03

Services and products

Core products from official sources

Explore products by use case: what they do, how to use them and whether they are billed separately.

esm.sh Public CDN

ES module delivery

Transforms npm, JSR, GitHub and pkg.pr.new sources into modules imported by URL, with on-demand builds and caching, version and dependency selection, import maps, TSX and raw-file mode. Designed for ES-module-capable browsers and Deno; the public service does not accept private npm packages.

esm.sh Self-Hosting

Open-source hosting

Deploy a module-build server from source or the official Docker image, with private and scoped npm registries, credentials, build-concurrency controls, and filesystem or S3-compatible storage. The code uses the MIT license; operators provide infrastructure, caching, updates and security maintenance.

Open source / Own resourcesOfficial product information
Sources: esm.sh official product pages and developer documentationVerified: 2026-11-17
04

Plans and pricing

Official public pricing
Website delivery and security plans · monthly and annual billing shown separately

Public CDN

Browser and Deno projects importing public JavaScript modules by URL

Free

Free public service

  • Use esm.sh module URLs without buying a plan or obtaining an API key
  • Public modules from npm, JSR, GitHub and pkg.pr.new
  • The first request may trigger a build; use self-hosting for private npm packages

Self-hosting

Teams needing private npm registries, their own domain and control of the service environment

Free software

Self-hosted

  • MIT-licensed esm.sh source, deployed as a Go service or Docker container
  • Configure private npm registry credentials and filesystem or S3 storage
  • The operator supplies and pays for servers, storage, bandwidth and domains

The public CDN is directly accessible, with no separate time-limited trial or published paid SLA.

Optional contributions through GitHub Sponsors and Open Collective offer acknowledgements such as website attribution. Self-hosting requires separately provisioned servers, storage, bandwidth and domains.

Prices checked: 2026-11-17
05

CdnChart Selection Guide

GoodSelection verdict

A useful fit for browser projects and existing Deno workflows that import JavaScript packages by URL

Transformation and public delivery reduce setup work, while applications requiring reproducible builds or independent availability arrangements should plan for dependency archives, their own builds or self-hosting.

Use casesProductsPricing and termsDocumentationSupport resources

Why we recommend it

  • A common module delivery interface for npm, JSR, GitHub and pkg.pr.new makes dependencies easy to combine in examples and lightweight applications.
  • Version selection, dependency mappings and build targets can be adjusted per project, with import maps helping keep frontend dependencies consistent.
  • The MIT-licensed server offers an alternative for teams connecting private npm registries and controlling their operating environment.

Considerations

Pair exact-version URLs with dependency locks and an archive strategy; a pinned package version alone does not guarantee unchanged build bytes forever. Critical applications should evaluate remote builds, edge caching and compatibility, and arrange their own availability safeguards. Self-hosting also requires ongoing upgrades and isolation of private registry credentials.

Related articles

Explore esm.sh products, use cases and buying advice

No articles about esm.sh yet.