Ruff Playground: Inspect AST, Tokens, Formatter IR & Config
Inspect Ruff diagnostics, AST, tokens and formatter IR
Use this playground when you want to see *how* Ruff reads your code, not just the lint results. Paste Python and inspect the parsed AST, the raw token stream and the formatter's intermediate representation (IR) alongside live ruff check diagnostics and ruff format output — then edit the Ruff config and share a link that reopens your exact code and settings. For a quick one-click lint or format without these internals, use the simpler Ruff Linter & Formatter.
Tool facts
- Supported Python
- Python 3.7 – 3.14
- Input limit
- Limited only by your device
- Last reviewed
- 2026-08-25
What it can't do
- •Execute your code — Ruff is a static linter and formatter.
- •Replace a type checker for cross-module type inference.
About Ruff Playground
This is a full, professional-grade 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 (ruff check), 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. A light/dark theme toggle keeps the editor comfortable in any lighting.
**How to check Ruff online, step by step:** (1) Paste or type your Python into the editor — syntax highlighting and live linting start immediately. (2) Read the **Diagnostics** tab: each issue shows its rule code (e.g. F401 unused import, E701 multiple statements), line and column, and whether Ruff can auto-fix it. (3) Switch to **Formatted** to see the ruff format output, or **AST** / **Tokens** / **Formatter IR** to inspect how Ruff parses your code. (4) Open **Settings** to edit the Ruff config as JSON — the same fields you'd put under [tool.ruff] in pyproject.toml, including select, ignore, line-length and format.quote-style. (5) Hit **Share** to copy a link that reopens your exact code and settings.
It runs the official Ruff build compiled to WebAssembly (currently Ruff 0.16.2), directly in your browser. For a quick one-click lint or format without the extra AST/tokens/IR views, use the simpler Ruff Linter & Formatter instead.
For a project-level decision, see our Ruff vs Pylint comparison tested on the same code. It shows which of 14 error categories each tool caught, what Ruff fixed automatically, measured CLI timings, and when Pylint's semantic and cross-file analysis still matters.
Frequently Asked Questions
Explore Other Tools
Python Marshal Encryptor
Compile Python to version-locked marshaled bytecode with optional zlib or zstd compression and get a ready-to-run loader. Target Python 3.10–3.14. Runs 100% in your browser.
Python Marshal Decrypt
Reverse a marshal loader and recover readable Python source — base64-decode, decompress (zlib/zstd), unmarshal, decompile, plus disassembly and a downloadable .pyc. Runs 100% in your browser.
Python Deobfuscator
A general Python deobfuscator and obfuscation-strength checker. Reverse weak lambda/exec loaders (base64 + zlib/bz2/lzma, nested layers) to reveal the real source — decoding the payload without ever running it — and flag strongly-protected code that can't be trivially peeled. Paste or upload a .py.
Python .pyc Decompiler
Decompile a compiled Python .pyc back to readable source with pycdc — in your browser via WebAssembly. Best-effort for 3.0–3.12, partial 3.13, disassembly 3.14.