Skip to main content

Ruff Playground — Online Ruff Editor (Lint, Format, AST)

playground.pyloading Ruff…
168 chars | 9 lines
| Loading the Ruff engine…
Official Ruff 0.15.22 WebAssembly build — diagnostics, formatting, AST, tokens and the formatter IR run locally in your browser, nothing uploaded. Edit the settings, share a link to your snippet, updates live as you type.

About Ruff Playground

This is a full, play.ruff.rs-style playground for Ruff, the extremely fast Rust-based Python linter and formatter from Astral. It updates live as you type: pick a tab to see the lint diagnostics, the formatted output (what `ruff format` would produce), the parsed AST, the raw token stream, the formatter's intermediate representation (IR), or the extracted comments.

The settings panel lets you edit Ruff's configuration directly as JSON — the same fields you'd put under `[tool.ruff]` in a `pyproject.toml`, including the `select` and `ignore` rule lists, `line-length`, and `format.quote-style`. Every view re-runs instantly against your config.

Because it runs the official Ruff build compiled to WebAssembly, everything happens locally in your browser — there is no server and your code is never uploaded. Use the Share button to copy a URL that encodes your code and settings, so you can send a colleague a reproducible example. For a quick one-click lint or format without the extra views, use the simpler Ruff Linter & Formatter instead.

Frequently Asked Questions

It's an interactive, in-browser editor for Ruff that updates live as you type. It shows the lint diagnostics, the formatted code, the AST, the token stream and the formatter IR for your Python, with an editable Ruff configuration — similar to the official play.ruff.rs, running the same Ruff WebAssembly engine locally in your browser.