A powerful Chrome extension that intelligently extracts and converts web content into clean, LLM-optimized markdown format.
Perfect for feeding web content to ChatGPT, Claude, or any other AI language model.
- 🎯 Smart Content Extraction - Advanced scoring algorithm identifies main content while filtering out ads, navigation, and clutter
- 📝 Markdown Conversion - Converts HTML to clean, properly formatted markdown
- ⚡ Multiple Access Methods - Right-click context menu and keyboard shortcut (Ctrl+Shift+C)
- 📌 Selection Support - Works with selected text or entire pages
- 🔗 Context Preservation - Automatically includes page title and URL for better AI context
- 🚀 Performance Optimized - Smart caching and robust clipboard handling
- 🎨 Clean Output - Removes excessive whitespace, normalizes formatting, and optimizes for LLM consumption
- Clone or download this repository
- Open Chrome and navigate to
chrome://extensions/ - Enable Developer mode (toggle in top-right corner)
- Click "Load unpacked" and select the project folder
- Start using - right-click on any webpage and select "Copy4LLM"
Right-click method:
- Navigate to any webpage
- Right-click anywhere (or select text first for partial extraction)
- Choose "Copy4LLM" from the context menu
- Clean markdown is automatically copied to your clipboard
Keyboard shortcut:
- Press
Ctrl+Shift+C(orCmd+Shift+Con Mac) on any webpage - Full page content is processed and copied as markdown
- Content Detection - Intelligent scoring system analyzes page structure to identify main content
- Smart Cleanup - Removes ads, navigation, scripts, and other non-essential elements
- Markdown Conversion - Leverages Turndown.js for high-quality HTML-to-markdown conversion
- Content Optimization - Normalizes formatting, removes excessive whitespace, and structures output for LLM consumption
- Context Enhancement - Automatically includes page metadata (title, URL) for better AI understanding
- Robust Clipboard Handling - Multiple fallback methods ensure reliable copying across different environments
copy4llm/
├── manifest.json # Extension configuration (Manifest V3)
├── background.js # Service worker - context menu & messaging
├── content.js # Content extraction & processing logic
├── popup.html # Extension popup interface
├── libs/
│ └── turndown.js # HTML to Markdown converter library
└── icons/ # Extension icons (16px, 32px, 48px, 128px)
- Google Chrome browser
- Basic knowledge of JavaScript and Chrome Extensions
- Clone this repository
- Open Chrome and navigate to
chrome://extensions/ - Enable "Developer mode"
- Click "Load unpacked" and select the project directory
- Make your changes and click the refresh icon to reload
content.js- Modify content extraction logic and selectorsbackground.js- Update context menu behavior and messagingmanifest.json- Configure permissions and extension metadata
Edit the selector arrays in content.js to customize extraction:
const USELESS_SELECTORS = [
// Add selectors for elements to remove
'.advertisement', '.popup', '.cookie-banner'
];
const CONTENT_SELECTORS = [
// Add selectors for main content detection
'article', 'main', '.content', '.post'
];-
Prepare Package
- Test thoroughly across different websites
- Create store listing screenshots
- Write compelling description
-
Developer Account
- Visit Chrome Web Store Developer Dashboard
- Pay one-time $5 registration fee
-
Upload & Submit
- Create ZIP file (exclude README.md)
- Upload via developer dashboard
- Complete store listing information
- Submit for review (typically 1-3 business days)
| Permission | Purpose |
|---|---|
contextMenus |
Create right-click menu item |
activeTab |
Access current tab content when activated |
clipboardWrite |
Copy processed content to clipboard |
notifications |
Show success/error notifications |
scripting |
Inject content scripts dynamically |
| Issue | Solution |
|---|---|
| Extension not visible | Enable Developer Mode in Chrome |
| Context menu missing | Reload extension in chrome://extensions/ |
| Copy functionality broken | Check site's clipboard access permissions |
| Poor content extraction | Site may use non-standard HTML structure |
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Turndown.js - Excellent HTML to Markdown converter
- Chrome Extensions team for comprehensive documentation and APIs