EVERYTHING XIAOMI
Get listed
Ruff logo

Ruff

Ruff is a free Python linter and code formatter written in Rust.

Place
#6 of 34
Score
6.5
Ruff's website

What Ruff is

Ruff is a free Python linter and code formatter written in Rust. It includes more than 900 built-in lint rules, among them native implementations of popular Flake8 plugins, and can automatically fix violations such as unused imports. Its formatter is designed as a replacement for Black, though the documentation notes possible differences at the margins. Ruff’s Language Server provides diagnostics, code actions, and formatting; the docs recommend pairing it with another Python language server for navigation and autocompletion. Setup guides cover VS Code, Sublime Text, PyCharm, and Zed, as well as GitHub Actions, GitLab CI/CD, and pre-commit hooks. Installation options include uv, pip, pipx, standalone installers, Homebrew, and Conda. Configuration can be stored in pyproject.toml, ruff.toml, or .ruff.toml. Ruff includes a Bandit-derived group of rules for common security issues in Python code, but does not support custom or third-party lint rules. The maker describes it as 10–100x faster than existing linters and formatters such as Flake8 and Black.

Good

  • More than 900 built-in rules.
  • Automatically fixes some lint violations.
  • Language Server offers diagnostics and formatting.
  • Integrates with GitHub Actions and GitLab CI/CD.

Watch out

  • Does not support custom or third-party lint rules.
  • Formatter may differ from Black at the margins.
  • Editor setup assistance is best-effort.

Who it suits

Ruff suits Python developers who want linting, formatting, and automatic fixes in one tool. It may also suit teams using supported editors, CI integrations, or pre-commit hooks.

Verdict

Ruff combines Python linting, formatting, and automatic fixes, with editor and CI integrations. Its lack of custom or third-party rules is an important constraint for teams needing their own lint checks.

Plans and prices

From Ruff's own pricing page, checked 29 Sep 2026.

All about pricing
PlanPriceWhat it gives you
RuffFreeOpen-source Python linter and formatter · permissively licensed

The facts

Each one read from Ruff's own pages, with the date it was checked.

What it does

Automatic fixes
Ruff can automatically fix lint violations, including removing unused imports.checked 29 Sep 2026
CI integrations
Ruff documents integrations for GitHub Actions and GitLab CI/CD, and hooks for pre-commit.checked 29 Sep 2026
Configuration
Ruff supports configuration through pyproject.toml, ruff.toml, or .ruff.toml.checked 29 Sep 2026
Docker
The maker publishes Ruff as a Docker image tagged by release and with a latest tag.checked 29 Sep 2026
Editor integrations
The setup guide documents integrations including VS Code, Sublime Text, PyCharm, and Zed.checked 29 Sep 2026
Editor support
The built-in Ruff Language Server provides diagnostics, code actions to fix them, and formatting; the docs recommend pairing it with another Python language server for navigation and autocompletion.checked 29 Sep 2026
Formatter
Ruff’s formatter is designed as a drop-in replacement for Black, though the FAQ notes there may be differences at the margins.checked 29 Sep 2026
Installation
Ruff can be installed using uv, pip, pipx, standalone installers, and package managers including Homebrew and Conda.checked 29 Sep 2026
Linting rules
Ruff includes over 900 built-in rules, including native implementations of popular Flake8 plugins.checked 29 Sep 2026
Notable limit
Ruff does not support custom or third-party lint rules.checked 29 Sep 2026
Purpose
Ruff is a Python linter and code formatter written in Rust.checked 29 Sep 2026
Security
Ruff’s rules include a Bandit-derived group for detecting common security issues, including possible vulnerabilities in Python code.checked 29 Sep 2026
Speed
The maker describes Ruff as 10–100x faster than existing linters and formatters such as Flake8 and Black.checked 29 Sep 2026
Support
The editor setup documentation says setup instructions are provided on a best-effort basis and directs users to open an issue for assistance.checked 29 Sep 2026

The company

Maker
Astral says it builds high-performance developer tools for the Python ecosystem and that its tools are open source and permissively licensed.checked 29 Sep 2026
The full review of Ruff

Overview

Ruff brings Python linting and formatting together in a Rust-based tool, with automatic fixes for some violations. It is best suited to developers who can rely on its built-in rules and want one tool across editing and CI.

Its broad rule set and editor support make it a practical fit for routine Python quality checks; teams that need custom or third-party lint rules should choose another approach.

For category comparisons, see Linters and Code Formatting Tools.

Key features

Linting, security checks, and fixes

Ruff includes more than 900 built-in rules, including native implementations of popular Flake8 plugins. It can automatically fix lint violations such as unused imports, which reduces routine cleanup, though it does not promise a fix for every violation. A Bandit-derived rule group also detects common security issues, including possible vulnerabilities in Python code.

The central trade-off is a fixed rule set: Ruff does not support custom or third-party lint rules. That is a clear limitation for organizations enforcing house checks or relying on plugin rules beyond those built in. The maker describes Ruff as 10–100x faster than existing linters and formatters such as Flake8 and Black; that makes speed a notable part of its appeal, but it is not a guarantee for every project.

Formatting and editor workflow

Ruff’s formatter is designed as a drop-in replacement for Black. The FAQ allows for differences at the margins, so teams moving from Black should account for those rather than assume identical output. The built-in language server provides diagnostics, code actions for fixes, and formatting. For navigation and autocompletion, the documentation recommends pairing it with another Python language server.

Setup guides cover VS Code, Sublime Text, PyCharm, and Zed. In CI, Ruff documents GitHub Actions, GitLab CI/CD, and pre-commit hooks, making it usable both during editing and in automated checks. Configuration can live in pyproject.toml, ruff.toml, or .ruff.toml.

Installation and deployment

Developers can install Ruff with uv, pip, pipx, standalone installers, or package managers such as Homebrew and Conda. Astral also publishes a Docker image tagged by release, alongside a latest tag. That range suits local development and container-based workflows without changing Ruff’s built-in-rule constraint.

Pricing

Ruff is free: its open-source Python linter and formatter is permissively licensed. The Ruff plan costs nothing. There is no free trial because the tool is free rather than a time-limited offer, and no paid plan is needed to use the stated linting and formatting capabilities.

That makes it straightforward for individual developers and teams to adopt without a software subscription. The meaningful cost is instead the functional boundary: teams that require custom or third-party rules may need a different tool or workflow.

Platforms

Ruff supports Linux, macOS, and Windows, and is also listed for web and self-hosted use. Its editor integrations and CI options extend it into development and automation workflows, while its published Docker image supports containerized use.

Who it's for

Ruff is a strong choice for Python developers who want linting, formatting, security checks, and some automatic fixes in one free tool. It particularly suits projects whose checks fit Ruff’s built-in rules and teams that want editor and CI integration without a paid plan.

It is a weaker fit for teams that depend on organization-specific lint rules or third-party rules. Its language server also is not a complete replacement for Python navigation and autocompletion, which the documentation says should come from another language server.

Pros and cons

  • Pros: More than 900 built-in rules and native implementations of popular Flake8 plugins cover a wide range of Python checks.
  • Pros: Automatic fixes, including removal of unused imports, handle some recurring cleanup directly.
  • Pros: The formatter, editor integrations, and CI hooks let teams use Ruff across local editing and automated checks.
  • Pros: The free, permissively licensed plan avoids a subscription cost.
  • Cons: No custom or third-party lint rules means teams cannot extend Ruff for specialized checks.
  • Cons: The formatter may differ from Black at the margins, so replacement does not guarantee identical formatting.
  • Cons: The language server needs a companion Python language server for navigation and autocompletion.
  • Cons: Editor setup help is provided on a best-effort basis, with assistance directed through issue reports.

Alternatives

Choose Biome if you need a free, open-source toolchain for web projects rather than Ruff’s Python-focused linting and formatting.

Astral is another free option from the same maker, grouping Ruff with uv and ty; choose it when you want that broader set of Astral tools rather than Ruff alone.

PMD is a free, downloadable static code analyzer; consider it when that analyzer form better fits your needs.

golangci-lint is a free, open-source project built by volunteers; choose it when that project is the better fit for your linting needs.

Stylelint is a free alternative for readers considering another linting tool.

ESLint is a free, open-source JavaScript linting utility; choose it for JavaScript rather than Python.

detekt is a free open-source Kotlin static analysis tool, making it the relevant option for Kotlin code.

ShellCheck is another free alternative for readers looking beyond Python tooling.

Verdict

Choose Ruff for a free, integrated Python linter and formatter when its built-in rules cover your needs. Its breadth, automatic fixes, editor support, and CI integrations make it a persuasive everyday option; look elsewhere if custom or third-party lint rules are essential.

Alternatives to Ruff

All alternatives
  1. 1Prettier logo

    Prettier

    Free planOpen sourceWebAPIExtensionLinux
    7.5Free plan
  2. 2

    Avidemux

    Free planOpen sourceWebLinuxmacOSWindows
    7.3Free plan
  3. 3

    Fourmolu

    Free planWebLinuxWindows
    6.7Free plan
  4. 4

    rustfmt

    Free planLinuxmacOSWindows
    6.6Free plan
  5. 5

    Black

    Free planLinuxmacOSSelf-hostedWindows
    6.5Free plan
  6. 6

    Zig fmt

    Free planLinuxmacOSWindows
    6.5Free plan