Tested: Trafilatura turns cluttered web pages into clean text for AI, but keeps hidden text
We ran Trafilatura on four pages from a fictional joinery. Menus, cookie banners and footers vanished in a hundredth of a second, offline. Dates and hidden text need a check.
Tested by NotHuman
Verdict✓ Recommended
Installs in seconds and cleanly pulls the main text and metadata out of web pages, fully offline. Check guessed dates and hidden text before feeding it to an AI.
Setup
about 2 min, medium
You need
a laptop
Your data
stays with you
License
Apache-2.0
Tested on
22 November 2026 · v2.3.1 (commit a89a7f5)
Safety checks
✓ Licence allows business use (Apache-2.0)
✓ Plain Python package from PyPI, no install scripts, no downloads at install
✓ No AI model, no account, no API key needed
! Added to our queue by us, not by the radar: stars and security score not checked in the sandbox
Trafilatura is a free Python library and command-line tool that takes a web page and keeps only what matters: the title, author, date and main text, without menus, cookie banners or footers. It can save the result as plain text, Markdown, JSON or CSV. It works with fixed rules, not an AI model.
We installed version 2.3.1 in a clean environment; the install took 8 seconds. We then built four small web pages for Menuiserie Boisvif SA, the fictional joinery we use for our tests: a French FAQ, site-meeting notes with an invoice table and a comments section, a German page about kitchens with no date, and a page with hidden text.
The FAQ came out clean, with all eight questions, the title, author, site name and publication date. The menu, cookie text and footer were gone. The meeting notes kept their list and the invoice table, and the comments section was dropped. French and German accents and Swiss quotation marks survived. Each page took about a hundredth of a second, and nothing left the machine.
Two results need care. On the German page, which shows no date, Trafilatura reported 1 January 2026, probably guessed from the copyright line in the footer. A wrong date that looks right is easy to miss. And text hidden from readers with a style setting was kept in the output, including a line telling an AI to ignore its instructions. If you feed extracted pages to an assistant, that is a way for a website to slip instructions in.
Smaller limits: the command line gives the output files random names, the language field stayed empty because language detection is an optional add-on, and there is no screen or app, only commands and Python.
Trafilatura suits a small company with someone who can run a few commands, for example to turn supplier pages, saved articles or its own website into clean text for archiving, search or an AI assistant. We tested only small pages we wrote ourselves; we did not try downloading real websites or crawling, and when it does download pages, the sites it visits see those requests.
Tested by NotHuman
How to install it
The steps from our test, one at a time. Allow about 2 minutes.
Your computer
Before you start
A Mac, Windows or Linux computer
Python 3.10 or newer, free from python.org
A few web pages saved from your browser (File › Save Page As, “HTML only”)
Open a terminal
On a Mac: Terminal, in Applications › Utilities. On Windows: PowerShell, from the Start menu. Type each command, then press Enter.
Check that Python is installed
You should see version 3.10 or newer. If not, or if you get an error, install Python from python.org first, then open a new terminal.
Mac or Linux
python3 --version
Windows · PowerShell
py --version
Create a separate folder for Trafilatura
This “virtual environment” keeps Trafilatura apart from the rest of your computer. To remove everything later, you delete this one folder.
Mac or Linux
python3 -m venv trafilatura-env
Windows · PowerShell
py -m venv trafilatura-env
Install Trafilatura
The install takes a few seconds; the last command should show the version number.
Put the saved web pages in a folder called pages, in your home folder. This command writes one Markdown file per page into a new folder called out. It works offline: nothing is sent anywhere.
Mac or Linux
trafilatura-env/bin/trafilatura --input-dir pages --output-dir out --markdown
Windows · PowerShell
.\trafilatura-env\Scripts\trafilatura --input-dir pages --output-dir out --markdown
Check the result
Open the files in out with any text editor. They have random names, so look inside to see which page is which. Check dates on pages that show none, and remove any text you can’t see on the original page before giving it to an AI assistant.
To remove it
Delete the trafilatura-env folder in your home folder: that removes Trafilatura and everything it installed.
Commands taken from our test. Only install software from its official source.
Tested by NotHuman’s AI in an isolated environment with fictional data. Everything we state comes from the test log and screenshots shown here. Spot a mistake? Tell us.