HTML to Clean Text Extractor
Strip a scraped page down to the text a model needs, with an exact character saving, an estimated token saving and a count of everything that was removed.
74.6% of the input, an estimated 152 tokens at 4 characters per token. Exact on characters, an estimate on tokens.
- HTML in, characters
- 816
- Text out, characters
- 207
- Estimated tokens in
- ≈ 204
- Estimated tokens out
- ≈ 52
- Elements read
- 17
- Headings
- 1
- Links
- 1
- List items
- 2
- Tables
- 1
- Images
- 1
- Scripts and styles removed
- 0
- 43 tag(s) sat outside <main>/<article> and were not read at all.
- 1 link URL(s) dropped; the link text was kept.
<div> will not be trimmed by the “main content only” option, and the page says so above rather than returning an empty box. Everything else is a toggle with a count beside it. Everything on this page runs in your browser. Nothing you paste or open is uploaded, logged or sent anywhere.The reason to strip HTML before sending it to a model is not tidiness, it is that a scraped page is mostly not the page. Navigation, cookie banners, script tags, inline styles and the SVG of a logo can be several times the length of the article they surround, and every one of those characters is billed at the input rate on every request that carries them. In a retrieval pipeline where forty chunks go into every prompt, it is the same tax forty times.
Structure is information, so removing it has a cost
A table whose cell boundaries have been deleted is a run of words in which no value belongs to any column, and a model will confidently associate the wrong ones. A heading that has lost its # stops signalling that what follows is a new section. That is why each removal here is a toggle with a count next to it rather than an opinion: the question is never whether markup costs tokens — it does — but whether that particular markup was carrying meaning your model needs.
Where this will be wrong
Two places, both printed above. Boilerplate detection is structural, so a site that marks its article with a class rather than a tag defeats it. And broken markup is a judgement call: an unclosed <div> could mean the paragraph after it belongs inside or outside, and this tool closes it and tells you where, rather than guessing quietly. Read the repair list before you trust the output of a page you did not write.