Website Cloner is an open-source Python command-line tool that downloads a complete webpage — HTML, CSS, JavaScript, images, and other linked assets — into an organized local folder for offline viewing.
What is Website Cloner?
Website Cloner is a Python 3 script that takes a URL as input and produces a local mirror of the page and its assets. It runs from the command line, requires the requests library, and is hosted on GitHub under the zebbern repository. It preserves the original HTML structure and formatting, rewrites internal links to point to local files, and saves everything into a folder named sites/domain_name/.
Key Features
- Complete asset download — Downloads the main HTML page and all linked resources, including CSS, images, and JavaScript files.
- Structure preservation — Keeps the original HTML formatting and layout intact rather than rendering a simplified version.
- CSS processing — Handles
@importstatements andurl()references inside stylesheets, downloading referenced fonts or images. - Link rewriting — Updates all internal links in HTML and CSS to point to the locally saved files.
- Organized output — Stores every clone under
sites/domain_name/, using the URL's domain and path to build the folder structure. - Firefox-compatible headers — Sends realistic user-agent and header information to avoid being blocked by servers.
- Quiet console mode — Prints minimal output during the download process.
- Simple CLI — Accepts a URL as a command-line argument, for example
python clone.py https://example.com/login.
Who should use Website Cloner?
Website Cloner is built for developers and researchers who need to work with web pages offline. Web archivists can save a snapshot of a page with all assets for long-term preservation. Front-end developers can download a reference implementation to study how a site's HTML, CSS, and scripts are structured. Security researchers and red-teamers may use it to create realistic lookalike pages for authorized testing, though the README emphasizes that users must respect terms of service and copyright law.
What can you do with Website Cloner?
- Web archiving: Save a complete copy of a page, including styles and images, so it can be viewed later without an internet connection.
- Offline documentation: Download tool or API documentation pages to browse them locally.
- Website backup: Keep a full static mirror of a page as a backup before making changes.
- Development reference: Inspect how a site's CSS and assets are organized by examining the cloned folder structure.
How does Website Cloner work?
The script first downloads the main HTML file while preserving its exact structure. It then parses the HTML with regular expressions to find resource links, downloads all CSS stylesheets, processes their internal URLs, downloads images and JavaScript files, and finally rewrites all links to point to the local copies. The entire clone is stored in an organized folder structure.
FAQ
Is Website Cloner free?
Yes, the repository is open source and free to use. It requires Python 3.6 or newer and the requests library.
Does Website Cloner work with any website?
It attempts to clone any public URL, but sites that require login, use heavy JavaScript rendering, or block non-browser user agents may not download completely. The script uses Firefox-compatible headers to reduce the chance of being blocked.
What Python version does it need?
Website Cloner requires Python 3.6 or later. You also need to install the requests library and have an active internet connection.
Can I use Website Cloner to copy pages I don't own?
The README's disclaimer says the tool is intended for legitimate purposes such as web archival, research, and backup, and that users are responsible for respecting website terms of service and copyright laws.
How do I view the cloned website?
After running the script, host the generated folder with a local web server, for example python -m http.server 8000 --directory /mirror_https_github.com_login, then open http://localhost:8000/ in your browser.







