FREEDOM251

Freedom251 › CDN Software

esm.sh

Free plan LinuxSelf-hostedWeb

Visit esm.sh Alternatives Pricing

esm.sh's own site

What esm.sh is

esm.sh lets developers import JavaScript modules through HTTP URLs to build web apps using packages from npm, JSR, GitHub, and pkg.pr.new, without build tools. It can transform TypeScript, TSX, Vue, and Svelte files for direct browser imports. Modules are bundled by default, while URL options can change bundling, request raw content, select exports, set dependency versions, or substitute packages. Export selection does not work with CommonJS modules. The service also supports CSS imports and loading modules as web workers; CSS importing works only when a package imports CSS directly from JavaScript. Build targets include es2015 through es2024, esnext, Deno, denonext, and Node. A lightweight TSX script can compile and cache TSX written directly in HTML. esm.sh supports modern browsers with ES6 modules, including Deno, and lists 330 edge locations with no edge compute. Its public CDN does not support private npm packages; the project points those users to self-hosting, with a Docker image and deployment instructions. The project is open source under the MIT License. The hosting guide recommends Linux with systemd, at least four CPU cores, 8GB RAM, and 100GB disk.

Who it suits

esm.sh suits developers who want to import public JavaScript packages into browser apps or Deno without a build step. Self-hosting is the listed route for private npm packages.

What it does well

  • Supports npm, JSR, GitHub, and pkg.pr.new packages.
  • Transforms TypeScript, TSX, Vue, and Svelte files.
  • Supports CSS imports and web workers.
  • Offers dependency version and package alias controls.
  • MIT-licensed project with Docker deployment instructions.

What to know first

  • Public CDN does not support private npm packages.
  • Export selection does not work with CommonJS modules.
  • CSS importing requires direct CSS imports from JavaScript.

Plans

PlanBilled and limitsPrice
esm.sh public CDNPricing not stated on the opened pageFree

As esm.sh lists them, read 10 Oct 2026. The maker's own page has the final word.

Getting started

  1. Open https://esm.sh/.
  2. Import a package from a supported source using an HTTP URL.
  3. Set dependency versions or package aliases with URL options if needed.
  4. Use the URL options to adjust bundling or request raw content.
  5. For private npm packages, follow the self-hosting instructions and Docker image.

esm.sh is a free, open-source module CDN for developers who want to import public JavaScript packages directly into modern browsers or Deno. It is strongest for prototypes, smaller applications, and build-light workflows; teams dependent on private npm packages or broad asset-delivery features should consider another route.

Its combination of URL-level dependency controls, source transforms, and broad runtime targets makes it more configurable than a basic package mirror. The trade-off is that several useful behaviors depend on module format and import pattern, so production projects need to check those boundaries before standardizing on it.

Overview

esm.sh serves packages from npm, JSR, GitHub, and pkg.pr.new over HTTP, with delivery through 330 edge locations. It supports modern browsers that implement ES6 modules and also supports Deno, making direct URL imports practical without a conventional build tool. The project is open source under the MIT License and is maintained by @ije.

The public CDN does not handle private npm packages. If an application depends on private packages, the documented path is to self-host esm.sh rather than expose those dependencies through the public service.

Key features

Imports, transforms, and TSX

esm.sh bundles modules by default and can transform TypeScript, TSX, Vue, and Svelte files for direct browser imports. That can remove configuration work for supported source files, although it is not a replacement for every application’s build pipeline. The 1KB esm.sh/tsx script allows TSX in HTML, compiling and caching the source at the edge; it is a focused convenience for lightweight pages rather than a complete front-end toolchain.

Dependency and output control

Import URLs can pin dependency versions with ?deps= and substitute packages with ?alias=. The ?standalone, ?bundle=false, and ?raw options let developers change bundling or transformation behavior. ?exports= can select particular exports, which helps reduce an import’s surface, but it does not work with CommonJS modules.

Browser delivery details

CSS imports are supported only when a package imports CSS directly from JavaScript, so packages using another stylesheet arrangement may not behave as expected. Modules can also load as web workers. Build targets span es2015 through es2024, esnext, Deno, denonext, and Node, giving projects a way to request output suited to their runtime.

Integrity and operations

The FAQ notes that an integrity-metadata-map CLI is in progress. Deno 1.18 and later can check hashes using a generated deno.lock file, providing a practical integrity option for Deno users while the broader tooling develops. Bug reports go through GitHub issues.

Pricing

esm.sh is free and open source under the MIT License. The public CDN plan is free. There are no paid tiers, seat charges, renewal terms, or stated usage quotas to weigh in the public plan. That simplicity suits personal projects, experiments, and teams that can work within the public service’s package and runtime boundaries; it does not provide a published commercial tier for organizations seeking contracted capacity or private-package access.

Platforms

The service is delivered through the web and supports Linux and self-hosted deployments. The CDN has 330 edge locations but no edge-compute offering. Self-hosting is the route for private packages, with a Docker image and deployment instructions provided. The hosting guide recommends Linux with systemd, at least four CPU cores, 8GB of RAM, and 100GB of disk, so private use carries infrastructure responsibility rather than a managed upgrade.

Who it's for

Choose esm.sh when you want public npm, JSR, GitHub, or pkg.pr.new dependencies in browser or Deno code without introducing a build step, and when URL controls over versions, aliases, bundling, or exports are valuable. It is particularly well suited to prototypes, documentation examples, small web applications, and Deno projects using lockfile hash checks.

Look elsewhere when private npm packages are central and you do not want to operate Linux infrastructure, when your package relies on CSS imports outside the supported JavaScript pattern, or when CommonJS export selection is important. Projects needing edge computation rather than CDN delivery also need a different service.

Pros and cons

Pros

  • Build-light package delivery: direct browser and Deno imports can avoid bundler setup for supported projects.
  • Broad source coverage: npm, JSR, GitHub, and pkg.pr.new packages are available through one import model.
  • Useful URL controls: dependency pinning, aliases, bundling switches, raw output, and export selection support targeted integration.
  • Modern source support: TypeScript, TSX, Vue, and Svelte transforms, plus web-worker loading, cover several browser-oriented workflows.
  • No license fee: the public CDN is free and the project is MIT-licensed.

Cons

  • No public private-package support: private npm users must self-host.
  • Conditional CSS behavior: CSS imports work only when JavaScript imports the CSS directly.
  • CommonJS limitation: ?exports= cannot select exports from CommonJS modules.
  • Self-hosting overhead: private deployments require maintaining the recommended Linux, CPU, memory, and storage environment.
  • No edge compute: it delivers transformed modules but does not run application logic at the edge.

Alternatives

For a wider directory of delivery tools, browse CDN Software. Pick Azion Content Delivery instead when a freemium CDN with API, desktop, and web platforms, a free trial, and a Hobby allowance of 10 workloads and 1TB monthly transfer fits better.

Fastly Image Optimizer is the more relevant choice for image-focused delivery, with a free allowance of 100,000 image requests per month. Uploadcare suits file workflows, offering a free plan with 1,000 operations, 5GB traffic, 1GB storage, and a 500MB maximum file size each month.

Choose Amazon CloudFront when a general CDN with a free distribution allowance, 1 million requests, and 100GB transfer is preferable. CacheFly is an option for CDN accounts with a free developer allocation of 100GB and one domain. Cloudinary is better suited to managed media workflows, with a free plan covering three users per account and 25 monthly credits.

Gcore CDN offers a PAYG CDN plan with 1TB of monthly traffic included, while ImageKit targets low-traffic sites, side projects, and testing with a forever-free tier. These services address broader delivery or media needs than esm.sh’s package-import focus.

Verdict

esm.sh is a strong choice for developers who want free, direct imports of public packages in modern browsers or Deno, especially when URL-level dependency and bundling controls reduce build overhead. Its main reason to look elsewhere is equally clear: private packages require self-hosting, and CSS handling, CommonJS export selection, and the absence of edge compute limit it as a universal delivery platform.

Verdict

esm.sh covers package imports and on-the-fly transforms for modern browser and Deno workflows. Check its private-package restriction and the conditions on CSS imports and export selection before choosing it.

Questions

How much does esm.sh cost?

The public CDN plan is listed as free. The pricing model is free.

Is esm.sh open source?

Yes. It is an open-source project under the MIT License.

Which package sources does it support?

It supports packages from npm, JSR, GitHub and pkg.pr.new.

Can it be used with private npm packages?

The public CDN does not support private npm packages. The project directs users to self-host esm.sh for that use case.

Which browsers and runtimes are supported?

The FAQ says it supports modern browsers with ES6 module support, including Deno. Build targets also include several ECMAScript versions, esnext, denonext and Node.

How can users report bugs?

The site directs bug reports to GitHub issues.

Facts from esm.sh's own pages

Browser features
esm.sh supports CSS imports and loading modules as web workers; CSS importing only works when the package imports CSS from JavaScript directly. · esm.sh, 10 Oct 2026
Bundling options
esm.sh bundles modules by default and offers `?standalone`, `?bundle=false`, and `?raw` options to change bundling or transformation behavior. · esm.sh, 10 Oct 2026
Compatibility
The FAQ says esm.sh supports modern browsers that support ES6 modules, including Deno. · esm.sh, 10 Oct 2026
Dependency controls
Import URLs can specify dependency versions with `?deps=` and substitute packages with `?alias=`. · esm.sh, 10 Oct 2026
Edge compute
none · esm.sh, 22 Sept 2026
Edge locations
330 · esm.sh, 22 Sept 2026
On-the-fly transforms
It can transform .ts, .tsx, .vue, and .svelte files for direct browser imports without build steps. · esm.sh, 10 Oct 2026
Private packages
The public CDN does not support private npm packages; the FAQ directs users to self-host esm.sh for that use case. · esm.sh, 10 Oct 2026
Purpose
esm.sh lets developers import JavaScript modules from HTTP URLs to build modern web apps using npm packages in browsers or Deno without build tools. · esm.sh, 10 Oct 2026
Runtime targets
Build targets include es2015 through es2024, esnext, Deno, denonext, and Node. · esm.sh, 10 Oct 2026
Security and integrity
The FAQ says an integrity metadata map CLI is in progress and notes that Deno 1.18+ can check hashes using a generated `deno.lock` file. · esm.sh, 10 Oct 2026
Self-hosting
The project provides a Docker image and deployment instructions; its hosting guide recommends Linux with systemd, at least four CPU cores, 8GB RAM, and 100GB disk. · github.com, 10 Oct 2026
Support and license
The site directs bug reports to GitHub issues and identifies esm.sh as an open source project under the MIT License, maintained by @ije. · esm.sh, 10 Oct 2026
Supported sources
The CDN supports packages from npm, JSR, GitHub, and pkg.pr.new. · esm.sh, 10 Oct 2026
Tree shaking
The `?exports=` option can select specific module exports, but this feature does not work with CommonJS modules. · esm.sh, 10 Oct 2026
TSX support
The lightweight 1KB `esm.sh/tsx` script lets developers write TSX directly in HTML, with source compiled and cached at the edge. · esm.sh, 10 Oct 2026

Where esm.sh stands on Freedom251

Look at these too