Copy any web page as clean Markdown or plain text.
Clean Copy takes what you select in the browser — or a whole page, or an HTML file — and gives you Markdown that pastes correctly into Obsidian, a README, a ticket or an email. Smart quotes, zero-width characters and layout junk are removed on the way.
Free and MIT-licensed. Runs entirely on your machine — no account, no server, no data sent anywhere.What it does
Select text on a page, right-click, choose Copy as Markdown or Copy as clean text. Or press Ctrl+Shift+C. The same converter runs in the terminal:
$ curl -sL https://example.com/article | clean-copy # Article title Paragraphs come out as paragraphs. Links become [text](url), headings keep their level, code blocks are fenced, and tables become pipe tables with the original column alignment. $ clean-copy --url https://example.com/docs --text > docs.txt
- Markdown that matches the page
- Headings, lists, links, images, bold and italic, fenced code blocks with language tags, tables with alignment, ordered lists that keep their start number.
- Typographic clean-up
- Curly quotes become straight quotes, non-breaking spaces become spaces, zero-width and other invisible characters are dropped.
- Plain-text mode
- When you only want the words: no Markdown syntax, just paragraphs and line breaks.
- Nothing leaves your machine
- The converter is a small JavaScript file with no runtime dependencies. The extension has no server; the CLI only opens a network connection if you pass
--url.
Who it is for
People who move text from the web into something else every day: developers writing docs and tickets, researchers keeping notes in Obsidian, writers pasting sources into a draft, and anyone who has pasted from a web page into a code editor and got a curly quote in a string literal.
It is one converter shipped in seven forms, so you can use the same behaviour wherever you happen to be:
- Chrome / Edge / Brave extension v1.5.2
- Firefox extension v1.5.2, named Clean Copy MD
- Command-line tool Homebrew or npm
- Obsidian plugin paste as Markdown
- VS Code extension paste as Markdown
- GitHub Action convert URLs or files in CI
- Web tool and bookmarklet no install
Install
The extensions are not in the Chrome Web Store or on addons.mozilla.org yet, so they are installed from a zip. That takes about a minute and does not require a developer account.
Chrome, Edge, Brave
- Download clean-copy-v1.5.2.zip and unzip it.
- Open
chrome://extensionsand turn on Developer mode. - Click Load unpacked and pick the unzipped folder.
Firefox
- Download clean-copy-firefox-v1.5.2.zip and unzip it.
- Open
about:debugging#/runtime/this-firefox, click Load Temporary Add-on and pickmanifest.json. - Temporary add-ons are removed when Firefox closes. A signed build for addons.mozilla.org is in progress.
Command line
brew install mahope/tap/clean-copy # macOS / Linux
npm install -g github:mahope/clean-copy-cli
npx github:mahope/clean-copy-cli page.html # run without installing
Reads stdin or a file, writes Markdown to stdout. --url fetches a page and keeps the main article, --text gives plain text, --copy puts the result on the clipboard. Full reference: CLI options.
Obsidian
Add mahope/clean-copy-obsidian through BRAT, or copy main.js, manifest.json and styles.css from the latest release into .obsidian/plugins/clean-copy-obsidian/. Then paste with Ctrl+Shift+V. Community-plugin listing is pending.
VS Code
Download the .vsix from the latest release and run code --install-extension clean-copy-1.0.0.vsix, or use Install from VSIX in the Extensions view. Paste HTML as Markdown with Ctrl+Shift+V.
GitHub Action
- uses: mahope/clean-copy-cli@v1
with:
url: https://example.com/changelog
output_file: docs/changelog.md
Also accepts file: or raw html: input and four output modes: markdown, plain, wikilinks and csv.
No install
The web tool converts pasted HTML or rich text in the browser tab. The bookmarklet works in any browser. There is also a small URL to Markdown page and an HTTP API for scripts that cannot run Node.
Price
Free. Every surface is MIT-licensed and the full source is on GitHub. A paid tier with custom cleaning rules and per-site defaults has been sketched, but there is no checkout and no date. The free version is complete, not a trial.
Questions
Why is the extension not in the Chrome Web Store?
The store listing needs a developer account and a review cycle that I have not finished. Loading the unpacked folder gives you exactly the same code; the store version will be identical when it lands.
Does it send my text anywhere?
No. The extension has no background server and requests no network permission. The CLI only makes a request when you ask it to fetch a URL. This site runs an anonymous page-view counter and nothing else.
How good is the Markdown?
Good on articles, documentation and most tables; it preserves column alignment, language tags on code blocks and nested lists. It is not a browser rendering engine, so heavily scripted pages or content injected after load can come out incomplete. Paste the result into the web tool if you want to see what the converter does with a specific page before installing anything.
Chrome shows a warning about developer-mode extensions.
That warning appears for every unpacked extension. It goes away once the store listing exists. You can read the whole extension — it is a few files with no build step.
Can I use the converter in my own project?
Yes. clean-copy-core.js is a single dependency-free module under the MIT license. The CLI, the extensions and the plugins all import it unchanged, and a parity test keeps them from drifting apart.
Who makes this
Clean Copy is built and maintained by Mads Holst Jensen, an independent developer in Odense, Denmark, working as mahoje.dk. It started as a fix for a personal annoyance — pasting from web pages into Obsidian — and grew into the set of tools above. Bug reports and pull requests are welcome on GitHub.
Related reading: HTML to Markdown from the terminal, pasting into Obsidian as clean Markdown, keeping table alignment in Markdown.