# Node.js vs Bun
URL: https://wwadd.dev/compare/nodejs-vs-bun
Last verified: 2026-10-05

Choosing a package manager and choosing a production runtime are separate decisions. Node.js supplies the Node API runtime; Bun adds integrated tooling and TypeScript/JSX transpilation, with compatibility you need to verify.

## Verdict
Start with the runtime your dependencies and host can support. You can adopt Bun tooling while keeping Node in production; running a Bun-specific test suite is not proof that the production app behaves the same on Node. Before changing runtimes, exercise the actual deployment, native add-ons, and failure paths, and measure the workload rather than borrowing a benchmark.

## Pick Node.js when
- Your production dependencies and host target a supported Node LTS release
- A Bun runtime migration would introduce compatibility work without a measured benefit for the workload

**Skip Node.js if:** the application requires Bun-specific APIs and has no compatible Node implementation.

## Pick Bun when
- You want an integrated toolchain and have checked its packages, test behavior, and build output
- Your application and host pass Bun runtime checks, and workload measurements justify the choice

**Skip Bun if:** a required dependency, native add-on, or production host has not passed your Bun compatibility checks.

## Related tools
- [Node.js](https://wwadd.dev/tools/nodejs)
- [Bun](https://wwadd.dev/tools/bun)

## What actually differs
- Scope: Node.js — Runtime with built-in APIs and a test runner; choose package management and build tooling separately; Bun — Runtime, package manager, bundler, and test runner in one toolchain
- TypeScript: Node.js — Supported releases strip erasable types; built-in stripping ignores tsconfig.json and does not transform enums or JSX; Bun — Transpiles TypeScript and JSX on execution; running a file does not type-check it
- Compatibility: Node.js — Use the Node version your dependencies and deployment platform support; Bun — Implements many Node APIs, but compatibility is incomplete and varies by API and package
- Native add-ons: Node.js — Check Node version, ABI, operating system, and architecture for the packages you ship; Bun — Supports Node-API add-ons; verify each required binary and platform rather than assuming every Node add-on works
- Hosting: Node.js — Choose Active or Maintenance LTS for production and check the host's supported versions; Bun — Confirm the host can run your Bun version and test signals, connections, and process behavior
- Mixed tooling: Node.js — Can run production while Bun handles installs or selected development scripts; Bun — Using bun install does not require replacing Node; verify the runtime that each script actually invokes

## Sources
- [Node.js TypeScript support](https://nodejs.org/api/typescript.html)
- [Node.js release and LTS policy](https://nodejs.org/en/about/previous-releases)
- [Node.js test runner](https://nodejs.org/api/test.html)
- [Bun runtime and script execution](https://bun.com/docs/runtime)
- [Bun TypeScript and JSX loaders](https://bun.com/docs/runtime/file-types)
- [Bun Node.js compatibility](https://bun.com/docs/runtime/nodejs-compat)
- [Bun Node-API support](https://bun.com/docs/runtime/node-api)

