are we formatting yet?

yes.

A catalog of code formatting tools across every language and ecosystem.

66 formatters
61 languages
53 active

Alejandra

An opinionated Nix code formatter with a focus on consistency and readability.

Unlicense Built with Rust

autopep8

Automatically formats Python code to conform to PEP 8 style guidelines. Uses pycodestyle to determine what needs to be fixed.

MIT Built with Python

Biome

A fast formatter and linter for JavaScript, TypeScript, JSX, JSON, and CSS. Designed as a Prettier-compatible drop-in replacement.

MIT Built with Rust

Black

The uncompromising Python code formatter. Deterministic output with minimal configuration.

MIT Built with Python

buf

A build, lint, and format tool for Protocol Buffers. The modern standard for managing Protobuf schemas, with dialect-aware formatting.

Apache-2.0 Built with Go

clang-format

A tool to format C, C++, Java, JavaScript, and other languages based on configurable style rules. Part of the LLVM project.

Apache-2.0 Built with C++

CSharpier

An opinionated C# code formatter inspired by Prettier. Minimal configuration, consistent output.

MIT Built with C#

dart format

The official Dart code formatter included in the Dart SDK. Applies a single canonical style.

BSD-3-Clause Built with Dart

dotnet format

Official .NET code formatter from Microsoft. Ships as part of the .NET SDK since .NET 6. Supports C#, Visual Basic, and F#.

MIT Built with C#

dprint

A pluggable and configurable code formatting platform written in Rust. Extremely fast with support for many languages via plugins.

MIT Built with Rust

elm-format

The standard formatter for Elm source code. Enforces a single canonical style with zero configuration.

BSD-3-Clause Built with Haskell

Fourmolu

A configurable Haskell source code formatter, forked from Ormolu. Provides more formatting options while maintaining consistency.

BSD-3-Clause Built with Haskell

gleam format

Built-in formatter for Gleam, a friendly language for building type-safe systems. Ships with the Gleam CLI.

Apache-2.0 Built with Rust

gofmt

The standard Go code formatter. Ships with the Go toolchain and enforces a single canonical style.

BSD-3-Clause Built with Go

gofumpt

A stricter version of gofmt that enforces additional formatting rules. Fully compatible with gofmt output.

BSD-3-Clause Built with Go

goimports

Extends gofmt to also manage Go import statements — adding missing imports and removing unused ones automatically.

BSD-3-Clause Built with Go

golines

A Go code formatter that shortens long lines, in addition to all the formatting fixes done by gofmt.

MIT Built with Go

google-java-format

Reformats Java source code to comply with Google Java Style. Opinionated with zero configuration.

Apache-2.0 Built with Java

isort

Sorts Python imports alphabetically and separates them into sections automatically. Compatible with Black and other formatters.

MIT Built with Python

ktfmt

A Kotlin code formatter by Meta that reformats source code to a uniform style. Based on google-java-format.

Apache-2.0 Built with Kotlin

mix format

The built-in code formatter for Elixir, shipped with the language. Enforces a consistent style with minimal configuration.

Apache-2.0 Built with Elixir

ocamlformat

Auto-formatter for OCaml code with configurable profiles ranging from conventional to compact styles.

MIT Built with OCaml

Ormolu

A formatter for Haskell source code that uses a single style with no configuration knobs.

BSD-3-Clause Built with Haskell

PHP-CS-Fixer

Automatically fixes PHP coding standard violations. Supports PSR-1, PSR-2, PSR-12, and many configurable rules.

MIT Built with PHP

Prettier

An opinionated code formatter that supports many languages and integrates with most editors.

MIT Built with JavaScript

roc format

Built-in formatter for the Roc programming language. Ships with the Roc CLI.

UPL-1.0 Built with Rust

RuboCop

A Ruby static code analyzer and formatter based on the community Ruby style guide. Auto-corrects many issues and is highly configurable.

MIT Built with Ruby

Ruff

An extremely fast Python linter and formatter written in Rust. Drop-in replacement for Black, isort, and many flake8 plugins.

MIT Built with Rust

rustfmt

The official Rust code formatter. Formats Rust code according to style guidelines, shipped with the Rust toolchain.

Apache-2.0 Built with Rust

scalafmt

Code formatter for Scala with highly configurable formatting rules and IDE integration.

Apache-2.0 Built with Scala

shfmt

A shell script formatter supporting POSIX Shell, Bash, and mksh. Fast and configurable.

BSD-3-Clause Built with Go

SQLFluff

A dialect-flexible SQL linter and formatter. Supports many SQL dialects including ANSI, BigQuery, Snowflake, PostgreSQL, MySQL, and more.

MIT Built with Python

StyLua

An opinionated Lua code formatter inspired by Prettier. Supports Lua 5.1-5.4 and Luau.

MPL-2.0 Built with Rust

swift-format

The official Swift code formatter from Apple. Formats Swift source code according to configurable rules.

Apache-2.0 Built with Swift

SwiftFormat

A command-line tool and Xcode Extension for reformatting Swift code. A community-maintained alternative to Apple's swift-format with extensive rule configuration.

MIT Built with Swift

Taplo

A TOML toolkit with a built-in formatter, validator, and language server. Handles TOML files with configurable style rules.

MIT Built with Rust

terraform fmt

Built-in formatter for HashiCorp Configuration Language (HCL), shipped with the Terraform CLI. Rewrites .tf and .tfvars files to canonical style.

BUSL-1.1 Built with Go

tofu fmt

Built-in formatter for OpenTofu, the open-source fork of Terraform. Rewrites .tf and .tfvars files to canonical HCL style.

MPL-2.0 Built with Go

typst fmt

Built-in formatter for Typst, a modern markup-based typesetting language. Ships with the Typst CLI.

Apache-2.0 Built with Rust

zig fmt

The built-in formatter for Zig, shipped with the compiler. Enforces the official Zig style guide.

MIT Built with Zig

erlfmt

An automated Erlang code formatter by WhatsApp. Focuses on preserving intent while enforcing consistent style.

Apache-2.0 Built with Erlang

nixpkgs-fmt

A Nix code formatter for nixpkgs. An alternative to Alejandra, opinionated about whitespace and structure.

Apache-2.0 Built with Rust

yapf

A Python formatter from Google that reformats code to the best formatting that conforms to the style guide, even if the original code didn't violate it.

Apache-2.0 Built with Python

@prettier/plugin-php

Prettier plugin

Official Prettier plugin for formatting PHP code.

MIT @prettier/plugin-php

@prettier/plugin-pug

Prettier plugin

Official Prettier plugin for formatting Pug (Jade) templates.

MIT @prettier/plugin-pug

@prettier/plugin-xml

Prettier plugin

Official Prettier plugin for formatting XML documents.

MIT @prettier/plugin-xml

@shopify/prettier-plugin-liquid

Prettier plugin

Prettier plugin for formatting Liquid templates. Maintained by Shopify.

MIT @shopify/prettier-plugin-liquid

prettier-plugin-apex

Prettier plugin

Prettier plugin for formatting Salesforce Apex code.

MIT prettier-plugin-apex

prettier-plugin-astro

Prettier plugin

Prettier plugin for formatting Astro components. Maintained by the Astro team.

MIT prettier-plugin-astro

prettier-plugin-java

Prettier plugin

Prettier plugin for formatting Java source code. Maintained by JHipster.

Apache-2.0 prettier-plugin-java

prettier-plugin-sh

Prettier plugin

Prettier plugin for shell scripts (bash/sh/zsh), Dockerfiles, .properties, .gitignore, and more.

MIT prettier-plugin-sh

prettier-plugin-solidity

Prettier plugin

Prettier plugin for formatting Solidity smart contracts.

MIT prettier-plugin-solidity

prettier-plugin-sql-cst

Prettier plugin

Prettier plugin for SQL using a concrete syntax tree for precise formatting. Supports multiple SQL dialects.

GPL-2.0 prettier-plugin-sql-cst

prettier-plugin-svelte

Prettier plugin

Prettier plugin for formatting Svelte components. Maintained by the Svelte team.

MIT prettier-plugin-svelte

prettier-plugin-tailwindcss

Prettier plugin

Prettier plugin that automatically sorts Tailwind CSS classes. Maintained by Tailwind Labs.

MIT prettier-plugin-tailwindcss

prettier-plugin-toml

Prettier plugin

Prettier plugin for formatting TOML files.

MIT prettier-plugin-toml

@prettier/plugin-ruby

Prettier plugin

Official Prettier plugin for formatting Ruby code. Runs a Ruby server for parsing.

MIT @prettier/plugin-ruby

prettier-plugin-blade

Prettier plugin

Prettier plugin for formatting Laravel Blade templates.

MIT prettier-plugin-blade

prettier-plugin-erb

Prettier plugin

Prettier plugin for formatting ERB (Ruby on Rails) templates.

MIT prettier-plugin-erb

prettier-plugin-gherkin

Prettier plugin

Prettier plugin for formatting Gherkin (Cucumber BDD) feature files.

MIT prettier-plugin-gherkin

prettier-plugin-glsl

Prettier plugin

Prettier plugin for formatting GLSL shader code (WebGL/OpenGL).

MIT prettier-plugin-glsl

prettier-plugin-go-template

Prettier plugin

Prettier plugin for formatting Go template files, commonly used with Hugo.

MIT prettier-plugin-go-template

prettier-plugin-jinja-template

Prettier plugin

Prettier plugin for formatting Jinja2 templates.

MIT prettier-plugin-jinja-template

prettier-plugin-marko

Prettier plugin

Prettier plugin for formatting Marko templates. Maintained by the Marko team.

MIT prettier-plugin-marko

prettier-plugin-motoko

Prettier plugin

Prettier plugin for formatting Motoko (Internet Computer) smart contract code. Maintained by DFINITY.

Apache-2.0 prettier-plugin-motoko

prettier-plugin-nginx

Prettier plugin

Prettier plugin for formatting Nginx configuration files.

MIT prettier-plugin-nginx