Is this Python script safe?
Paste code on the left. It is checked automatically, and the verdict appears here.
The report shows what the code can reach — network, files, commands, credentials — and flags the combinations dangerous scripts rely on.
Checks run locally in your browser. Nothing is uploaded, logged or stored.
Results update as you type.
How it works
Paste a script from a tutorial, a Gist, a PyPI package or an AI answer. Comments and docstrings are masked before scanning, so a mention of subprocess in documentation never produces a finding.
- The language is detected from the code, and you can override it in the dropdown.
- JavaScript and TypeScript are parsed into an abstract syntax tree, so function calls, imports and property accesses are matched structurally rather than as text. Python, PowerShell and shell are scanned with rules that first mask comments and string contents. HTML is scanned tag by tag, with inline scripts handed to the JavaScript analyzer.
- Findings are split into capabilities (what the code can do) and suspicious behaviour (patterns typical of malicious code).
- Behaviour chains are evaluated: reading cookies is one thing, reading cookies and posting them to a hardcoded host is another.
- A risk level is assigned and every finding links to the line it came from, so you can jump straight to the code responsible.
What it detects
- requests, httpx, urllib, aiohttp and raw socket connections
- subprocess.run, Popen, os.system, os.popen and shell=True
- eval, exec, compile and __import__
- pickle.loads, marshal.loads and unsafe yaml.load, which execute code while loading data
- reads of ~/.ssh, ~/.aws/credentials, browser login databases and wallet files
- pynput and keyboard listeners, screenshot and webcam capture
- base64, zlib, binascii and codecs decoding of hidden payloads
- cron, systemd, registry and startup folder persistence
Privacy: your code stays in your browser
The whole static analysis, including parsing, rule matching and risk scoring, is compiled into the page and runs on your machine. Checking code never sends it anywhere and nothing is logged. Without an account nothing is stored either: close the tab and it is gone.
Signing in is optional. If you do, the code on your desk (up to 3,000 characters) is saved to your account so you can open it on your other devices. Only you can read it, pressing Clear deletes it, and it is deleted automatically 24 hours after your last edit.
Why we never say "this code is safe"
Nobody can prove a piece of code is harmless by inspecting it. Code can fetch its real payload at runtime, behave differently on another machine, or hide its intent in a dependency you cannot see. So the verdict is always one of four: low apparent risk, potential risk, high risk, or unable to determine. "Low apparent risk" means these particular patterns are absent — nothing more.
Frequently asked questions
- Is open() flagged as dangerous?
- It is reported as a file access capability, not as a problem. It only contributes to a higher risk level when combined with something like an upload to a hardcoded external host.
- Why is pickle.loads treated as high risk?
- Unpickling data runs code contained in it. Loading a pickle file you did not create yourself is equivalent to running an unknown script.
- Can it check a requirements.txt or a whole package?
- Not yet. The MVP analyses one file at a time. Paste the module you are unsure about.
- Is Python itself safe?
- The language is fine; the script is what matters. A Python script runs with your user account's full permissions — there is no sandbox — so it can read your files, contact any server and install anything you can. Treat a Python file from the internet exactly like any other program: check what it does before you run it.