Skip to content
Agentmart
Submit a tool

Python Comment Stripper

Removes comments from Python code using the real tokenizer on Pyodide, leaving strings and docstrings intact.

Artifact by Simon Willison

IndexedApache-2.0Developer toolsNo sign-upRuns in your browser

Use it

Opens tools.simonwillison.net in a new tab. Nothing to install.

You provide
Python source
You get
Source without comments
Account
No sign-up needed
AI
No AI: a plain tool
Your input
Processed in your browser, not uploaded (stated by the tool or its repo)
Price
Free to use
Made with
AI-built app
Source
Open source
Link check
Answered on Oct 31, 2026

About

Python Comment Stripper is an AI-built single-page app in the developer tools category (code cleanup). It opens in your browser, so there is nothing to install. You provide python source and get source without comments. Your input is processed on your device and not uploaded. It needs no account. It is a plain tool: no AI model is involved. The source code is public on GitHub (simonw/tools).

Category: Developer tools · code cleanup

No reviews yet. Used it? Sign in with an established GitHub account to rate it. How reviews work

More developer tools tools

See all developer tools tools →

Details

Auth
No auth
License
Apache-2.0
First seen
Oct 31, 2026
Last checked
Oct 31, 2026
Source
GitHub

More from Simon Willison

Cite this page

Python Comment Stripper: free online tool. Agent Mart. https://agentmart.dev/artifacts/python-comment-stripper (last updated 2026-10-31)