Oxfmt Beta
We are excited to announce that Oxfmt has reached beta.
Oxfmt is a Rust-powered, Prettier-compatible code formatter built for the JavaScript ecosystem. It is designed to deliver full compatibility with modern tooling while dramatically improving performance.
In benchmarks, Oxfmt is more than 30× faster than Prettier and 3× faster than Biome on an initial run without caching. See the full benchmark results.
Since the December alpha release, we have expanded support for additional file formats, added embedded language formatting, introduced import sorting, integrated Tailwind CSS support, and delivered numerous stability and compatibility improvements.
Oxfmt has already seen broad adoption across the ecosystem. Projects using Oxfmt include: openclaw/openclaw, vuejs/core, vercel/turborepo, huggingface/huggingface.js, getsentry/sentry-javascript, npmx-dev/npmx.dev and many more.
Getting Started
Install oxfmt as a dev dependency:
pnpm add -D oxfmtAdd scripts to package.json:
{
"scripts": {
"fmt": "oxfmt",
"fmt:check": "oxfmt --check"
}
}Format files:
pnpm run fmtCheck formatting without writing files:
pnpm run fmt:checkMigrating from Prettier
Install, migrate your config, and reformat in a single command:
pnpm add -D oxfmt && pnpm oxfmt --migrate prettier && pnpm oxfmtFor the full migration guide, see Migrate from Prettier.
AI Migration Prompt
Alternatively, you can copy this prompt to your AI coding assistant to migrate your project:
Migrate this project from Prettier to Oxfmt following https://oxc.rs/docs/guide/usage/formatter.html:
1. Install oxfmt and run `oxfmt --migrate prettier`
2. Update package.json scripts to use oxfmt
3. Update CI workflows to use `oxfmt --check`
4. Update lint-staged to use `oxfmt --no-error-on-unmatched-pattern`
5. Run oxfmt to reformat all files
6. Uninstall prettier and related packages
7. Update editor settings for oxfmt
8. Update CONTRIBUTING.md, AGENTS.md, or CLAUDE.md if they mention prettierFor more detailed instructions, check out the Oxfmt docs.
Highlights of New Features Since Alpha
100% Prettier Compatibility
Oxfmt now passes 100% of Prettier's JavaScript and TypeScript conformance tests. For the few remaining formatting inconsistencies, we have reported them to the Prettier team and are collaborating to converge on the expected behavior.
This means you can migrate from Prettier to Oxfmt with confidence that your code will be formatted identically. If you encounter any uncovered cases, please report them.
Additional File Formats
Oxfmt now formats JavaScript, JSX, TypeScript, TSX, JSON, JSONC, JSON5, YAML, TOML, HTML, Angular, Vue, CSS, SCSS, Less, Markdown, MDX, GraphQL, Ember, and Handlebars. This means you can use a single formatter for your entire project.
Tailwind CSS Integration
Automatic Tailwind CSS class sorting is supported for both JS/TS and non-JS/TS files. The functionality of prettier-plugin-tailwindcss is built-in, so the plugin is no longer required.
Import Sorting
Built-in import sorting is now available with configurable options:
ignoreCase- Case-insensitive sortingsortSideEffects- Sort side-effect importsnewlinesBetween- Control blank lines between import groupsgroups- Custom sort order groupscustomGroups- Define custom grouping rules
For more options, please see the full reference.
package.json Sorting
Automatic package.json field sorting is enabled by default, keeping your package.json files consistently organized.
Embedded Language Formatting
Format code embedded in template literals:
- CSS-in-JS with styled-components-like syntaxes,
styled-jsxand CSS prop support - Angular
@Componenttemplate and styles
Node.js API
A programmatic API is now available:
import { format, type FormatOptions } from "oxfmt";
const input = `let a=42;`;
const options: FormatOptions = {
semi: false,
};
const { code } = await format("a.js", input, options);
console.log(code); // "let a = 42"CLI Changes
--init- Bootstrap a new configuration file--migrate prettier- Migrate from Prettier configuration--migrate biome- Migrate from Biome configuration--stdin-filepath- Specify filepath for stdin input- Glob pattern expansion support -
oxfmt './packages/**/*.{js,jsx}'
Config Changes
overrides- Apply different options to specific file patternsinsertFinalNewline- Control trailing newlines.editorconfigsupport forinsert_final_newline
Editor Support
Oxfmt works in all supported editors: VS Code, Cursor, Zed, IntelliJ IDEA, WebStorm, Neovim, and any editor with LSP support.
Roadmap
We are continuing to improve Oxfmt towards a stable release:
- Prettier plugins support
- Improve xxx-in-js formatting
- Stability
- Performance optimizations
Next Steps
See the full installation guide in the Oxfmt docs.
Reporting Issues
For formatting differences, please refer to the formatting differences discussion.
Join the Community
We'd love to hear your feedback on Oxfmt. Connect with us:
- Discord: Join our community server for real-time discussions
- GitHub: Share feedback on the Formatter RFC
- Issues: Report bugs or request features on our issue tracker



