oxfmt

VoidZero Inc. & Contributors·oxc-project.oxfmt

Oxfmt is a high-performance formatter for the JavaScript ecosystem.

Oxfmt is a high-performance formatter for the JavaScript ecosystem. - Supported languages JavaScript, JSX, TypeScript, TSX, JSON, JSONC, JSON5, YAML, TOML, HTML, Angular, Vue, CSS, SCSS, Less, Markdown, MDX, GraphQL, Ember, Handlebars - Built for scale Oxfmt targets large codebases and CI environments, with an emphasis on high throughput and predictable performance. It is built on the Oxc compiler stack and avoids architectural bottlenecks common in existing formatter implementations. Our benchmarks show Oxfmt to be approximately 30x faster than Prettier and 2x faster than Biome. - Batteries included - Oxfmt includes built-in features that typically require external Prettier plugins: - Import sorting - Tailwind CSS class sorting - package.json field sorting - Embedded formatting (CSS-in-JS, GraphQL, etc.) - Prettier-compatible Oxfmt integrates into existing Prettier-based workflows. The oxfmt CLI behaves similarly to Prettier by default, allowing adoption with minimal changes to scripts and tooling. Oxfmt matches Prettier’s JavaScript formatting. When migrating from recent versions of Prettier, formatting differences should not occur; any differences are considered bugs. Oxfmt currently passes approximately 95% of Prettier's JavaScript and TypeScript test suite. The remaining cases are niche scenarios, and we work with the Prettier team to converge on formatting over time. No additional dependencies or configuration needed.

winget install --id oxc-project.oxfmt --exact --source winget

Latest 0.81.0·November 30, 2026

Release Notes

πŸ’₯ BREAKING CHANGES

  • b7dd935 ast: [BREAKING] Split object methods into ObjectMethodProperty (#29951) (Cameron)
  • 836f56d oxfmt: [BREAKING] Format parser:angular files by oxc_formatter_htmlish (#29885) (Yuji Sugiura)
  • c9ff940 formatter_toml: [BREAKING] Rework oxc_formatter_toml based on oxc-toml/parser (#29928) (Yuji Sugiura)
  • 783eb98 oxfmt: [BREAKING] Stop formatting extension-less README file as markdown (#30138) (Yuji Sugiura)

πŸš€ Features

  • 0a06514 formatter_htmlish/angular: Format nested pipes (#29921) (Yuji Sugiura)
  • c1a8f99 formatter_core: Add empty_line().without_expand_parent() (#30144) (Yuji Sugiura)

πŸ› Bug Fixes

  • 376a30c formatter_css: Assert in debug builds that no comment is left unclaimed (#30550) (Yuji Sugiura)
  • 4a7dc86 formatter_css: Claim comments at five positions that dropped or moved them (#30546) (Yuji Sugiura)
  • 9fb1043 formatter_css: Print a comment inside !important after it, and keep a mixin call's tail comment (#30528) (Yuji Sugiura)
  • 9daed1f formatter: Keep a comment after implements and an interface's extends after the keyword (#30454) (Yuji Sugiura)
  • 89a15ba formatter: Keep a comment after extends after the keyword (#30453) (Yuji Sugiura)
  • b944f13 formatter_css: Keep the content after a block comment ending its line on the next line (#30452) (Yuji Sugiura)
  • 5008f71 formatter_graphql: Print comments inside a type after it and never merge two comments (#30451) (Yuji Sugiura)
  • 1d78c62 oxfmt: Handle directory targets overlapping or mixed with globs (#30548) (Yuji Sugiura)
  • 74d6855 oxfmt: Support absolute glob patterns in CLI paths (#30547) (Yuji Sugiura)
  • 8797d0e formatter_graphql: Keep a comment in front of a list type outside its brackets (#30396) (Yuji Sugiura)
  • 68fdb4c formatter_css: Bump oxc-css-parser to 0.0.24 and keep SCSS at-rule names and the Less keyword - as written (#30395) (Yuji Sugiura)
  • 6995724 formatter_css: Make / spacing symmetric and space math-function operators (#30392) (Yuji Sugiura)
  • d5e8529 formatter: Hug negated logical conditions in statement heads (#30391) (Yuji Sugiura)
  • a6dbdae formatter_css: Space block comments around a declaration's : as in a media feature (#30312) (Yuji Sugiura)
  • 5d44160 formatter_css: Print a commented @import prelude as an uncommented one (#30309) (Yuji Sugiura)
  • 570f5bc formatter_css: Print a commented @media query as an uncommented one (#30308) (Yuji Sugiura)
  • f7d158d formatter_css: Print a commented @supports declaration as in a rule (#30307) (Yuji Sugiura)
  • 043c39c formatter_css: Keep comments around a Less @import's options in place (#30304) (Yuji Sugiura)
  • 328b70a formatter_css: Keep a comment before an at-rule prelude in front of it (#30245) (Yuji Sugiura)
  • ed7a80a formatter_css: Print a commented @supports term like an uncommented one (#30244) (Yuji Sugiura)
  • 1622c5f formatter_css: Print a commented @layer list like an uncommented one (#30236) (Yuji Sugiura)
  • 4efe4a9 formatter_css: Print a commented @media feature as Prettier does (#30235) (Yuji Sugiura)
  • 25113df formatter_css: Keep a commented at-rule prelude's strings and comments as written (#30229) (Yuji Sugiura)
  • 0520d5d formatter,formatter_css: Keep strings as written in a css-in-js selector holding ${} (#30227) (Yuji Sugiura)
  • 48d0f88 formatter_core: Keep without_expand_parent() on texts map_text_in_ir rewrites (#30226) (Yuji Sugiura)
  • 58b07b7 formatter_htmlish/angular: Keep a block's markers glued when its body's edge is whitespace-only text (#30252) (oxc-captain[bot])
  • 0397e63 oxfmt: Match .editorconfig sections as the spec says (#30225) (Yuji Sugiura)
  • c02cbe4 formatter_yaml: Count a keep-chomped scalar's lone space-only EOF line as yaml@2 does (#30222) (Yuji Sugiura)
  • 79ab8e9 formatter_yaml: Re-indent block scalar content with an explicit indentation indicator (#30217) (Yuji Sugiura)
  • b54b83c formatter_htmlish: Keep a {{ }} holding a reference to a quote as written (#30211) (Yuji Sugiura)
  • 0ec0e12 formatter,formatter_htmlish/angular: Break a conditional before a pipe with its closing paren (#30206) (Yuji Sugiura)
  • 16c3d72 formatter_htmlish/angular: Lay out a nested pipe's parens as JS does a binary's (#30201) (Yuji Sugiura)
  • 9343247 formatter_htmlish: Break {{ }} only when it does not fit on its own (#30157) (Yuji Sugiura)
  • b172afc formatter_htmlish/angular: Keep a block glued when only whitespace-only text is outside it (#30154) (Yuji Sugiura)
  • 0676278 formatter_htmlish/angular: Keep ) after time param of @placeholder|loading (#30151) (Yuji Sugiura)
  • e7ed925 formatter_htmlish: Respect html-in-js placeholders in