Skip to content

Bun ships a built-in formatter 286 times faster than Prettier

bun fmt lands in Bun 1.4.4, reading your existing Prettier or oxfmt config across more than 20 languages, with bun check and bun install also getting faster in the same release.

Source: Bun

Bun 1.4.4, released on 22 October, adds bun fmt, a code formatter built directly into the runtime. It covers more than 20 languages, including JavaScript, TypeScript, JSX, CSS, HTML, Vue, Svelte, JSON, YAML, TOML, Markdown and GraphQL, and reads your existing Prettier or oxfmt config rather than needing its own.

Bun’s own benchmarks put it at 286 times faster than Prettier on Prettier’s own 2,616-file repository, 60ms against 17 seconds, and 234x to 425x faster across vitest, date-fns, monkeytype and h3. Against oxfmt the gap is smaller but still wide: 3x on RSSHub, up to 31x on fumadocs. Languages that need a Prettier plugin, such as Astro, still fall back to the Prettier already in your project. The same release makes bun check 1.4x to 7.8x faster on large projects, Bun quotes MUI’s docs dropping from 10.28 seconds to 1.31, and bun install can now migrate Yarn Berry lockfiles, not just Yarn 1.

Why it matters: formatting is usually invisible until it is slow enough that a team skips it on save or in a pre-commit hook. A sub-second pass over a few thousand files is the kind of speed-up that changes whether people actually run the formatter every time, rather than batching it for CI to catch later.

The caveat: the benchmark numbers are Bun’s own, run against its own chosen projects. Worth timing against your actual codebase, and checking the output matches your current Prettier config, before swapping it into CI.

Share

Related reading

More from The Wire

All briefs