Bun v1.3 is here! Redis, MySQL, SQLite, better Node compatibility →

Bun
Bun v1.3 is here! →

Bun is a fast JavaScript
all-in-one toolkit|

Bun is a fast, incrementally adoptable all-in-one JavaScript, TypeScript & JSX toolkit. Use individual tools like bun test or bun install in Node.js projects, or adopt the complete stack with a fast JavaScript runtime, bundler, test runner, and package manager built in. Bun aims for 100% Node.js compatibility.

USED BY

Four tools, one toolkit

Use them together as an all-in-one toolkit, or adopt them incrementally. bun test works in Node.js projects. bun install can be used as the fastest npm client. Each tool stands on its own.

REPLACESNode.js
ReplacesNPM
ReplacesVitest
ReplacesVite

Who uses Bun?

Claude Code uses Bun

Bun's single file executables & fast start times are great for CLIs.

Railway Functions powered by Bun

Bun's all-in-one toolkit makes Railway's serverless functions fast and easy to use.

Midjourney uses Bun

Bun's built-in WebSocket server helps Midjourney publish image generation notifications at scale.

What's different about Bun?

Bun provides extensive builtin APIs and tooling

Builtin Core Features

Bun
Bun
Node
Node.js compatibility
Web Standard APIs
Native Addons
TypeScript
JSX
Module loader plugins

Builtin APIs

Bun
Bun
Node
PostgreSQL, MySQL, and SQLite drivers
S3 Cloud Storage driver
Redis client
WebSocket server (including pub/sub)
HTTP server
HTTP router
Single-file executables
YAML
Cookies API
Encrypted Secrets Storage

Builtin Tooling

Bun
Bun
Node
npm package management
Bundler
Cross-platform $ shell API
Jest-compatible test runner
Hot reloading (server)
Monorepo support
Frontend Development Server
Formatter & Linter

Builtin Utilities

Bun
Bun
Node
Password & Hashing APIs
String Width API
Glob API
Semver API
CSS color conversion API
CSRF API

Everything you need to build & ship

Production-ready APIs and tools, built into Bun

$ bun run

Bun is a JavaScript runtime.

Bun is a new JavaScript runtime built from scratch to serve the modern JavaScript ecosystem. It has three major design goals:

Bun is designed as a drop-in replacement for Node.js. It natively implements thousands of Node.js and Web APIs, including fs, path, Buffer and more.

The goal of Bun is to run most of the world's server-side JavaScript and provide tools to improve performance, reduce complexity, and multiply developer productivity.

Bun works with Next.js

Lee Robinson

VP of Developer Experience at Cursor (Anysphere)

app/blog/[slug]/page.tsx

import { s3, $, sql } from "bun";
 
export default async function BlogPage({ params }) {
  const [post] = await sql`
    SELECT title, image_key, content
    FROM posts
    WHERE slug = ${params.slug}
  `;
 
  const imgUrl = s3.file(post.image_key).presign({•••});
 
  const wordCount = await $`echo ${post.content} | wc -w`;
 
  return (
    <div>
      <h1>{post.title}</h1>
      <img src={imgUrl} />
      <p>Word count: {wordCount}</p>
    </div>
  );
}

Full speed full-stack

Fast frontend apps with Bun's built-in high performance development server and production bundler. You've never seen hot-reloading this fast!

Develop and ship frontend apps

Bun's built-in bundler and dev server make frontend development fast and simple. Develop with instant hot reload, then ship optimized production builds—all with zero configuration.

$ bun init --react

Start a dev server

Run bun ./index.html to start a dev server. TypeScript, JSX, React, and CSS imports work out of the box.

Hot Module Replacement

Built-in HMR preserves application state during development. Changes appear instantly—no manual refresh needed.

Build for production

Build optimized bundles with bun build ./index.html --production. Tree-shaking, minification, and code splitting work out of the box.

$ bun install

Bun is an npm-compatible package manager.

Bun

pnpm

17x

npm

29x

Yarn

33x

Installing dependencies from cache for a Remix app.
View benchmark

Replace yarn with bun install to get 30x faster package installs.

$ bun test

Bun is a test runner that makes the rest look like test walkers.

Bun

Vitest

5x slower

Jest+SWC

8x slower

Jest+tsjest

18x slower

Jest+Babel

20x slower

Replace jest with bun test to run your tests 10-30x faster.

The APIs you need. Baked in.

Start an HTTP server

Start a WebSocket server

Read and write files

Hash a password

Frontend dev server

Write a test

Query PostgreSQL

Use Redis

Import YAML

Set cookies

Run a shell script

Call a C function

index.tsx
import { sql, serve } from "bun";

const server = serve({
  port: 3000,
  routes: {
    "/": () => new Response("Welcome to Bun!"),
    "/api/users": async (req) => {
      const users = await sql`SELECT * FROM users LIMIT 10`;
      return Response.json({ users });
    },
  },
});

console.log(`Listening on localhost:${server.port}`);

Learn more

Documentation

Get started with Bun and learn how to use all of its features

API Reference

Explore the complete API reference for Bun's runtime and toolkit

Developers love Bun.

Sainder
Jan 17
@Sainder_Pradipt
Bun
Lic
Jan 18
@Lik228
bun
Martin Navrátil
Jan 17
@martin_nav_
Bun....
SaltyAom
Jan 17
@saltyAom
bun
reaxios
Jan 17
@reaxios
bun install bun
kyge
Jan 17
@0xkyge
bun
James Landrum
Jan 17
@JamesRLandrum
Node
orlowdev
Jan 17
@orlowdev
Yeah, bun, but my code does not have dependencies.
hola
Jan 17
@jdggggyujhbc
bun
std::venom
Jan 17
@std_venom
Bun
tiago
Jan 19
@tiagorangel23
should have used Bun instead of npm
Sainder
Jan 17
@Sainder_Pradipt
Bun
Lic
Jan 18
@Lik228
bun
Martin Navrátil
Jan 17
@martin_nav_
Bun....
SaltyAom
Jan 17
@saltyAom
bun
reaxios
Jan 17
@reaxios
bun install bun
kyge
Jan 17
@0xkyge
bun
James Landrum
Jan 17
@JamesRLandrum
Node
orlowdev
Jan 17
@orlowdev
Yeah, bun, but my code does not have dependencies.
hola
Jan 17
@jdggggyujhbc
bun
std::venom
Jan 17
@std_venom
Bun
tiago
Jan 19
@tiagorangel23
should have used Bun instead of npm
46officials
Jan 19
@46officials
Bun
yuki
Jan 19
@staticdots
Bun
Stefan
Jan 17
@stefangarofalo
Bun
Samuel
Jan 17
@samueldans0
Bun always
Divin Prince
Jan 17
@divinprnc
Yeah Bun
Gibson
Jan 16
@GibsonSMurray
bun
Oggie Sutrisna
Jan 16
@oggiesutrisna
bun
emanon
Jan 16
@0x_emanon
✅ bun
yuki
Jan 16
@staticdots
bun
SpiritBear
Jan 16
@0xSpiritBear
bun
Ayu
Jan 12
@Ayuu2809
Bun good 🧅
46officials
Jan 19
@46officials
Bun
yuki
Jan 19
@staticdots
Bun
Stefan
Jan 17
@stefangarofalo
Bun
Samuel
Jan 17
@samueldans0
Bun always
Divin Prince
Jan 17
@divinprnc
Yeah Bun
Gibson
Jan 16
@GibsonSMurray
bun
Oggie Sutrisna
Jan 16
@oggiesutrisna
bun
emanon
Jan 16
@0x_emanon
✅ bun
yuki
Jan 16
@staticdots
bun
SpiritBear
Jan 16
@0xSpiritBear
bun
Ayu
Jan 12
@Ayuu2809
Bun good 🧅
Hirbod
Jan 19
@hirbod_dev
For everything. Yes. I even run with bunx expo run:ios etc
Luis Paolini
Jan 18
@DigitalLuiggi
Jus use @bunjavascript
buraks
Jan 18
@buraks____
I use bun patch and I love it!
fahadali
Jan 8
@fahadali503
Bun
Aiden Bai
Jan 1
@aidenybai
2025 will be the year of JS/TS and @bunjavascript is why
Catalin
Jan 1
@catalinmpit
Bun is goated
MadMax
Jan 3
@dr__madmax
@bunjavascript is yet to get enough appreciation it deserves.
Baggi/e
Jan 3
@ManiSohi
Performant TS/JS backend needs more love Elysia for the win
Michael Feldstein
Dec 18
@msfeldstein
holy shit bun is the solution to spending all day mucking around with typescript/module/commonjs/import bullshit and just running scripts
Hirbod
Jan 19
@hirbod_dev
For everything. Yes. I even run with bunx expo run:ios etc
Luis Paolini
Jan 18
@DigitalLuiggi
Jus use @bunjavascript
buraks
Jan 18
@buraks____
I use bun patch and I love it!
fahadali
Jan 8
@fahadali503
Bun
Aiden Bai
Jan 1
@aidenybai
2025 will be the year of JS/TS and @bunjavascript is why
Catalin
Jan 1
@catalinmpit
Bun is goated
MadMax
Jan 3
@dr__madmax
@bunjavascript is yet to get enough appreciation it deserves.
Baggi/e
Jan 3
@ManiSohi
Performant TS/JS backend needs more love Elysia for the win
Michael Feldstein
Dec 18
@msfeldstein
holy shit bun is the solution to spending all day mucking around with typescript/module/commonjs/import bullshit and just running scripts