Add Python source
Checking for Python errors? There are two steps. First, select Inspect code to find hidden characters and whitespace issues. Then select Check syntax and names in the results below to check for errors such as unexpected indentation or misspelled variable names. Syntax checking does not run automatically.
A completed inspection sends a content-free usage signal to this site. No code, filenames, or findings are included.
Python scanner guide: how to inspect code and read results
Your code is treated as inert text and is never run. Review exact before/after changes before applying an offered fix.
Source input is locked while decisions are active. Undo or reset decisions, or start a new inspection.
Files and pasted source are limited to 1 MB of UTF-8. Loading and inspection stay in this browser. Loaded files retain their original line endings until you edit the text above; editing uses the text area's normalized line endings.
Visibility lane
Visibility results
Select Show line to locate a finding, then review an offered fix or keep the original. Syntax checks are available below; your code is never executed.
Code view
Long lines show excerpts. Show line centers the finding’s location.
Findings
This does not mean your Python code is error-free. Syntax and name checks are separate: select Check syntax and names below. Your code is never executed.
Syntax lane
Syntax results
Check the original and cleaned copy as complete Python 3.14 files, without executing either. The first check loads about 13 MB of runtime files from this app; later checks on this page reuse the loaded runtime. Your source stays in this browser.
Python reports the first syntax error in each copy and its compiler warnings. If syntax passes, local analysis looks for undefined names, unused imports and variables, common mistakes such as comparing with is instead of ==, and code that is risky when input comes from someone else, such as SQL built with f-strings or eval() on user input. These are automated code-review signals, not a security audit: they do not verify every execution path, runtime behavior, or security, and an empty result does not mean the code is correct or safe.
Findings lane
Code findings
- Error Python cannot run the file.
- Likely bug Will probably fail or misbehave when that line runs.
- Security Could be risky if any input comes from someone else. A review signal, not proof of a vulnerability.
- Warning Worth a closer look.
- Tip Optional cleanup.
Review findings in context. Wildcard imports, dynamic namespaces, and framework or host injection can supply names this analysis cannot resolve, so a reported name is not proof of a bug. No automatic fixes are offered.
Original source
Cleaned copy
Cleanup decisions and output
Changes from the original
Brackets label spaces, line endings, and hidden characters. Context is abbreviated; changed characters are shown in full.
Save the reviewed copy
Downloads use UTF-8 and preserve the original BOM and line endings. Copy sends the same source text; clipboard destinations may normalize line endings. Neither output proves the program is correct.
The JSON audit contains source digests, positions, offered edits, and decision history without full source text. Replay requires the same original source and detector versions; imported decisions are previewed before restoration.