IDEAFACTORYS LAB · Developer

Python Formatter

Format Python locally in your browser. Failures are shown; nothing is uploaded.

Paste Python

Everything runs in your browser and is not uploaded. Formatting uses the vendored Ruff formatter (@wasm-fmt/ruff_fmt, MIT licence; Ruff’s Python style, default 4-space indent and an 88-character line width). Valid Python — including strings, comments, implicit line joining, and brackets — is rewritten; a parse failure is shown on this page and is never emitted as if it succeeded. This page only formats Python; it is not a converter to or from another language.

Formatted code


A format failure is shown as an error. The page never presents a bad result as success. The local WASM module must finish loading first.