---
title: Prettier's style, at native speed
summary: tidy is a code formatter written in Rust. One binary prints what Prettier prints, for JavaScript, TypeScript, HTML, CSS, Markdown, YAML, JSON, TOML and more.
---
{{#var bench = $data.bench}}
{{#var claims = [
[
"Matches Prettier",
"Every release is checked against Prettier " +
$data.release.prettier +
" over a 12,000-file corpus: 100% of 3,906 JavaScript files and 3,308 of 3,309 TypeScript files.",
],
[
"Formats the code inside your code",
"Styles and scripts in HTML and Vue. Markdown code blocks and front matter. CSS, GraphQL, HTML and Markdown in JS template literals.",
],
[
"Configurable, if you need it",
"Reads tidy.json, tidy.jsonc or tidy.toml, on top of .editorconfig. The defaults are Prettier’s.",
],
[
"Stable output",
"Where Prettier would change its mind on the next run, tidy prints where it settles, so tidy check stays green in CI.",
],
]}}
{{#var langs = [
["JavaScript, TypeScript, JSX", "Prettier"],
["HTML, Vue, Handlebars, MJML", "Prettier"],
["CSS, SCSS, Less", "Prettier"],
["JSON, JSONC, JSON5", "Prettier"],
["YAML, GraphQL, Markdown", "Prettier"],
["XML, SVG", "@prettier/plugin-xml"],
["TOML", "taplo"],
["Dockerfiles", "dprint-plugin-dockerfile"],
["INI, .editorconfig, .npmrc", "prettier-plugin-ini"],
]}}
Skip to content
00
Prettier's style, at native speed.
tidy is a code formatter written in Rust. One binary
prints what Prettier prints, for every language below. It does not
shell out to Node — though there is a Node binding if you want
one.
{{ bench.machine }}, all cores, mean of both run orders.
Bars compare the three native tools; Prettier is off that scale.
every corpus and the method →
02 / Output
Byte for byte what Prettier prints
Not a lookalike style. tidy's tests run Prettier over the
same corpus and compare the bytes, so a difference is a bug —
unless it is one of the
documented deviations.
routes.tsas written
{{{
$data.sample.input
}}}
routes.tstidy up
{{{
$data.sample.output
}}}
03 / Why
{{#each claims as claim}}
{{ claim[0] }}
{{{ claim[1] }}}
{{/each}}
04 / Languages
Every language Prettier formats
Plus the ones its plugins cover, built into the same
binary. Nothing to install, nothing to register.
{{#each langs as lang}}
{{ lang[0] }}{{ lang[1] }}
{{/each}}
05 / Config
Configurable, if you need it
Each file takes the nearest
tidy.json,
tidy.jsonc
or
tidy.toml, on top of
.editorconfig. Shared keys apply everywhere, and a
language section overrides them. See
every option.