Clone any website in seconds. Perfect for learning, prototyping, and building.
WebClone is a command-line tool that creates local, mostly offline copies of web pages: it saves HTML, CSS, JavaScript, images, fonts, and related assets, then rewrites paths so you can open the result from disk or a small static server.
Perfect for: Learning web development, studying designs, creating prototypes, and building templates.
- Playwright (Chromium) loads your URL so JavaScript-rendered content is included in the HTML snapshot.
- Light + dark capture β two browser passes merge network activity so
prefers-color-scheme: darkstylesheets and assets load, and the saved HTML comes from the dark pass (with commondark/data-themehooks on<html>). - HTML parsing pulls
link,script,img,srcset, lazydata-src, icons, inline<style>url(...), etc. - Recursive crawling β follows every internal
<a href>to discover and download ALL site pages (homepage, sub-pages, blog posts, etc.), not just the entry URL. - Module chunk discovery β finds all
<link rel="modulepreload">and<script type="module">entries to download dynamically-loaded JS chunks. - Build path preservation β
_nuxt/,_next/,cms/,css/,fonts/paths stay exactly as the server served them so framework dynamic imports keep working offline. - Extra downloads from responses the browser actually made (fonts, chunks, images that never appear as plain tags).
- CSS follow-up walks downloaded stylesheets for
url(...)and@import, downloads nested assets, and rewrites paths. - A final pass replaces known remote URLs in HTML and
*.csswith local paths where possible. - Falls back to a plain HTTP fetch if Playwright is unavailable or errors.
β οΈ For educational use only. Respect copyright laws. See Legal Disclaimer.
pip install webclone-cli
playwright install chromium# Clone any website
webclone https://example.com
# Clone with custom name
webclone https://stripe.com stripe_clone
# View the result
cd example_com_cloned
python -m http.server 8000
# Visit http://localhost:8000- π One command β
webclone <url> [folder] - π·οΈ Recursive crawling β Follows internal links and downloads ALL pages (like wget --mirror)
- π Headless browser render β Snapshots the DOM after JS runs (Playwright Chromium)
- π‘ Fetch/XHR recording β Captures runtime API calls as JSON files for offline use
- π§© Framework route interception β Detects Nuxt
_payload, Next_next/data, Astro islands, SW manifests - π¦ Service Worker capture β Saves sw.js, workbox bundles, webmanifest
- πΎ Browser storage export β Exports localStorage, sessionStorage, cookies
- π DOM mutation observer β Waits for SPA content to stabilize before snapshot
- π Infinite scroll detection β Scrolls until height stops growing (blogs, feeds, docs)
- πΌοΈ Iframe capture β Clones same-origin iframes inline
- π HAR export β Saves network.har for debugging failed clones
- π Dark theme aware β Light + dark passes for complete asset capture
- π¦ CSS deep crawl β Follows
url(...)and@importinside stylesheets - π§ Build path preservation β Keeps
_nuxt/,_next/,cms/paths intact - π§© Module chunk discovery β Finds
modulepreloadand lazy-loaded JS - π§ Local path rewriting β Points HTML/CSS at downloaded files
- π Per-clone README β Auto-generated docs with asset counts
- π― Great for learning β Inspect real layouts, typography, and structure offline
- Static Sites - Landing pages, portfolios (Docker.com, Stripe.com)
- Client-Side Apps - React, Vue, Next.js apps (Vercel.com, Linear.app)
- Documentation - Docs sites, wikis, guides
- Marketing Pages - Product pages, company sites
- CMS Sites - WordPress, Umbraco (clones design, not backend)
- Server-Side Apps - PHP, ASP.NET (visual shell only)
- API-Heavy Apps - Dynamic dashboards (layout only)
Still useful for: Studying designs, extracting UI components, learning CSS structures.
Learn more about what can/cannot be cloned β
webclone https://www.stripe.com
webclone https://www.linear.app
webclone https://vercel.comwebclone https://landing-template.com my_project
# Edit the HTML/CSS to customizewebclone https://docs.docker.com docker_docsProblem: JavaScript won't run when opened directly (file://)
Solution: Use a local server:
cd your_cloned_site
python3 -m http.server 8000
# Visit http://localhost:8000- External CDN resources may fail to download (CORS, auth, signed URLs)
- Some assets load only after user interaction or infinite scroll β clone again after scrolling the live site, or accept gaps
- Analytics / POST-only URLs in the network list may βfailβ on GET β harmless
- Check browser DevTools (F12) β Console when viewing the clone
Sites behind Cloudflare / aggressive bot checks may block headless Chromium or return challenge pages. There is no guaranteed bypass. Options: use content youβre allowed to archive (API, export, staging), or complete a challenge in a normal browser and explore cookie / session workflows yourself if appropriate.
- Server-side rendered content won't clone
- Database/CMS content needs backend
- Works best with client-side rendered sites
your_cloned_site/
βββ index.html # Main HTML file
βββ page1.html # Crawled pages
βββ page2/
β βββ index.html # Nested pages
βββ README.md # Auto-generated docs
βββ _nuxt/ # Framework build files (preserved as-is)
βββ _next/ # Next.js build files (preserved as-is)
βββ cms/ # CMS assets (preserved as-is)
βββ assets/
βββ css/ # Stylesheets
βββ js/ # JavaScript files
βββ images/ # Images
βββ fonts/ # Web fonts
βββ files/ # Other assets
- Python 3.8+
- Internet connection
- Chromium for Playwright (one-time after install):
playwright install chromium - Dependencies (auto-installed):
- requests
- beautifulsoup4
- lxml
- playwright (renders the page so JS-heavy sites clone better; assets still downloaded by WebClone)
webclone <url> [output_directory]
Arguments:
url Website URL to clone
output_directory Optional custom folder name (default: <host>_cloned)There are no subcommands or flags β one URL, one optional output folder.
Contributions welcome!
git clone https://github.com/AbdirahmanNomad/webclone.git
cd webclone
pip install -r requirements.txt
playwright install chromium
pip install -e ".[dev]"MIT License - see LICENSE file for details.
For educational purposes only.
- β Learning and personal projects
- β Design inspiration and research
- β Commercial use without permission
- β Copyright infringement
Users are responsible for respecting copyright laws. See full Legal Disclaimer.
Abdirahman Ahmed
- Website: abdirahman.net
- GitHub: @AbdirahmanNomad
- PyPI: webclone-cli
Give a βοΈ if this project helped you!
- Report Issues
- View on PyPI
- Share with #WebClone
Made with β€οΈ for developers learning web development