Skip to main content

perfectclone: website cloner that copies the real site, 1:1

Pull the real frontend of any public site in ~15 seconds. No AI, no tokens.

Clone any website. Get the real files. huly.io cloned with perfectclone: 0.00% pixel difference, 14 seconds, 157 files, 0 LLM calls.

perfectclone clones any website 1:1. It crawls the site with a real browser (Playwright), downloads the site's own HTML, JavaScript, CSS, fonts and images, and gives you a folder you can serve, edit and deploy. Then it lets you rebrand it, rehost it and strip the original owner's trackers without breaking it, including Next.js sites that hydrate on load.

pip install perfectclone

perfectclone clone example.com
perfectclone serve example.com             # → http://localhost:8000

That's it. Chromium is downloaded automatically the first time you clone. Requires Python 3.10+.

Or try it without installing anything, using uv:

uvx perfectclone clone example.com

Why not an AI cloner?

Most "clone any website" tools today regenerate the site: an AI agent looks at screenshots or scraped markup, writes a new React/Next.js app, and compares the result against the original with a visual-similarity score until it's close enough. That gets you a lookalike. The code is new, the behaviour is approximate, and there are always gaps.

perfectclone doesn't regenerate anything. It mirrors the bytes the site actually serves, so the clone is the site: same markup, same bundles, same animations, same JavaScript running. Sometimes the real solution is the simple one.

AI cloners wget / HTTrack perfectclone
Copies the site's real files ❌ ✅ ✅
Pixel-identical on modern JS sites ❌ ❌ ✅
Catches lazy-loaded JS, fonts, images — ❌ ✅
React / Next.js sites still run — ❌ ✅
Rebrand without breaking the site ✅ ⚠️ ✅
Strips the original site's trackers — ❌ ✅
Works without an LLM or API key ❌ ✅ ✅

Tested on real sites

Each card is one site split down the middle: the live site on the left, the clone on the right.

Live vs clone split view for nextjs.org, astro.build, svelte.dev, vitepress.dev, docusaurus.io and wordpress.org

scripts/compat.py clones each site, serves the copy, and compares its home page with the live one at 1440×900, with animations and videos paused on the same frame:

Site Built with Pixel match Hydration errors Notes
huly.io Next.js 100% 0
nextjs.org Next.js 100% 0
astro.build Astro 100% 0
svelte.dev SvelteKit 100% 0
vitepress.dev VitePress (Vue) 100% 0
docusaurus.io Docusaurus (React) 100% 0
wordpress.org/news WordPress 100% 0
paulgraham.com Hand-written HTML 100% 0
example.com Static HTML 100% 0
framer.com Framer 96% 0 Cookie banner needs Framer's backend
webflow.com Webflow 93% 0 Cookie banner won't run on localhost; carousel caught mid-scroll

Every clone loaded with zero requests to trackers. Run it yourself with python scripts/compat.py, and please open an issue for any site that doesn't come out right.

Commands

perfectclone clone <url> [-o out] [--max-pages 200] [--extract] [--keep-trackers] [--ignore-robots]
perfectclone serve <site> [-p 8000]
perfectclone replace <site> <old> <new> [--exact-case] [--substring]
perfectclone rehost <site> <old-origin> <new-origin>
perfectclone strip-trackers <site>
  • clone writes out/site/ (the working copy) and out/manifest.json (pages, failures, third-party hosts the site uses). --extract also saves each page's text, metadata (headings, links, images, forms, JSON-LD) and a full-page screenshot to out/extract/. Trackers are stripped by default.
  • replace renames text everywhere: HTML, JS, CSS, JSON, SVG. It also handles the UPPER, lower and Capitalized variants, and leaves URLs and asset paths alone so nothing 404s.
  • rehost points canonical, Open Graph, JSON-LD and sitemap URLs at your domain.
  • serve works like a static host: clean URLs (/about → /about/index.html), and /_next/image requests are served from the mirrored originals.

Rebrand a clone and put it online:

perfectclone clone acme.com -o acme
perfectclone replace acme "Acme" "Globex"
perfectclone rehost  acme https://acme.com https://globex.com
npx netlify-cli deploy --dir acme/site --prod      # or any static host

How it works

  1. Crawl with a real browser. Each page is rendered in Chromium and scrolled to the bottom, and every response is recorded. That catches what static mirrors miss: code-split JS chunks, fonts requested from CSS, images behind lazy loading. Links are followed breadth-first, seeded from the sitemap. robots.txt is respected unless you pass --ignore-robots.
  2. Mirror the server's bytes. Pages are saved as the HTML the server sends, not the rendered DOM, because that's what the site's JavaScript expects to hydrate. Assets keep their URL paths, and CSS/JS are scanned for further references (url(), srcset, chunk paths) until nothing new turns up.
  3. Edit without breaking hydration. A Next.js App Router page ships its HTML and a serialized copy of the React tree in self.__next_f.push(...) script chunks. Change one and not the other, and React throws a hydration error and re-renders from the payload, undoing your edit. perfectclone decodes the payload stream, edits it row by row, recomputes the UTF-8 byte lengths of length-prefixed text rows (<id>:T<hex>,…), rejoins rows that span chunks, and writes it back next to the matching HTML edit.
  4. Strip trackers. Google Analytics/Tag Manager, the Meta pixel, LinkedIn Insight, Hotjar, Clarity, Segment, PostHog, HubSpot, TikTok, Reddit, X, Cloudflare Web Analytics, RB2B and more. They're removed from <script>/<noscript> tags, from preload hints, and from Next.js next/script elements that only exist in the payload.

Limits

  • No backend. Forms, logins, search and API calls still go to the original servers (or fail). perfectclone copies the front end.
  • Next.js client-side navigation needs each page's RSC payload answered for ?_rsc= requests. perfectclone mirrors them and perfectclone serve routes them. On a plain static host, internal links fall back to full page loads: everything still works, just without the instant transitions.
  • Chunks that are only requested after a click (say, a modal's code) are captured if the crawl triggered them or a bundle names them as a string. A bundle can also assemble a chunk URL at runtime, and that one may be missed.
  • Bot protection (CAPTCHAs, aggressive Cloudflare rules) can block the crawl. perfectclone does not try to get around it.
  • Embeds (YouTube, Cal.com, maps) and third-party CDNs keep loading from their own hosts.

Roadmap

Clone apps behind a login, like dashboards. Today perfectclone sees what an anonymous visitor sees, and data that loads from APIs after the page renders isn't kept. The plan, for apps you have an account on:

  • Crawl as you. Sign in once in a browser window; perfectclone saves the session and crawls with it.
  • Record API responses. Keep every JSON response the app fetches during the crawl and have perfectclone serve replay them, so charts, tables and lists show real data offline.
  • Explore by clicking. Click through navigation, tabs and menus to reach views that only exist in client-side routing.

The result is a clickable snapshot of the UI and its data at capture time. Saving, server-side filtering and live updates still need the real backend.

Other ideas: hydration-aware editing for Nuxt, SvelteKit and Remix payloads, and a deploy helper that writes _redirects / vercel.json rules so ?_rsc= and /_next/image work on static hosts. Contributions welcome.

Contributing

perfectclone is open source under the MIT License. Issues and pull requests are welcome, especially reports of sites that don't clone cleanly. See CONTRIBUTING.md, and please follow the Code of Conduct. Report security issues privately as described in SECURITY.md.

Metadata

Release files for perfectclone 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for perfectclone 0.1.0
File Size Uploaded Provenance Actions
perfectclone-0.1.0.tar.gz 27.5 kB With provenance Details for perfectclone-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for perfectclone 0.1.0
File Interpreter ABI Platform Actions
perfectclone-0.1.0-py3-none-any.whl Python 3 none any Details for perfectclone-0.1.0-py3-none-any.whl

Total release size: 50.4 kB

Release files / perfectclone-0.1.0.tar.gz

Download URL perfectclone-0.1.0.tar.gz
Size 27.5 kB
Tags Source
SHA-256 checksum
How to use checksums
af5963f511f4246ffe227313010e4e58c21028a8c4da879bc45aad9ec21023aa
BLAKE2b-256 checksum
How to use checksums
fe861e34da211c01e8dcdf5b1560376c75cb9f408451ef0d5b3b140279be63da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Release files / perfectclone-0.1.0-py3-none-any.whl

Download URL perfectclone-0.1.0-py3-none-any.whl
Size 22.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0448632b9df1ec055c313f766ba2016479e58c1d4209477844102e8db9463f1b
BLAKE2b-256 checksum
How to use checksums
452b65bc035bdd25d7078a93ac0e55750687d3b08e2c3282cee2fef89fe1ac0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Security for perfectclone 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for perfectclone-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page