Convert HTML to Text Online Free

Convert HTML files to Text online for free. Upload your file and get clean, LLM-ready output instantly. No sign-up, 50 MB per file, nothing stored.

HTML to Text: Getting Just the Words Out of a Web Page File

Sometimes you don't want a document. You want a wall of sentences. Training data for a classifier, a corpus for topic modelling, chunks for an embedding index, input for a summariser that will ignore formatting anyway — in all of those, every # and | and ** is a character that costs you something and buys you nothing.

That's what this page is for. Drop in a .html or .htm file and you get back the readable prose with the markup gone — no tags, no attributes, no syntax. Free, no sign-up, 50 MB limit, and the file isn't stored anywhere afterwards. If you want the heading hierarchy and tables kept instead, HTML to Markdown is the sibling page, and the format toggle above carries your file across to it without a re-upload.

What "Stripping Tags" Actually Has to Get Right

Naively deleting everything between angle brackets produces garbage, and it's worth understanding why — it's the difference between usable text and a mess.

HTML has block elements and inline elements, and they need opposite treatment. When a </p> closes and the next <p> opens, that's a paragraph boundary and needs to become a line break. When a </strong> closes mid-sentence, that's not a boundary at all — inserting a newline there would slice the sentence in half. Get this wrong and you end up with text where the quick brown fox arrives as four separate lines because someone bolded two of the words.

The other half of the job is whitespace. HTML collapses runs of spaces, tabs and newlines down to one when it renders, so source that's been pretty-printed with indentation contains enormous amounts of whitespace that was never meant to be visible. A proper HTML to text conversion collapses it the same way the browser does, which is why the output reads like the page looked rather than like the file did. List items get their own lines, <br> becomes a break, and table cells are separated rather than jammed together.

Entities, Smart Quotes, and Mystery Characters

HTML encodes certain characters so they don't collide with the markup. &amp; is an ampersand. &lt; is a less-than sign. &nbsp; is a non-breaking space, &#8217; is a curly apostrophe, &mdash; is an em dash. In the browser you never see the codes — you see the characters.

In extracted text, undecoded entities are poison. A tokeniser treats &#8217; as several tokens of noise, keyword matching fails on don&#8217;t, and any downstream string comparison quietly breaks. So entities get decoded on the way out. Non-breaking spaces are the sneaky one specifically because they look identical to normal spaces on screen while failing every split(" ") you write; they come through as real spaces here.

Encoding is worth a glance too. Most modern files declare <meta charset="utf-8">, but older pages and CMS exports are sometimes Latin-1 or Windows-1252 in disguise. If your output has ’ where an apostrophe should be, the source file lied about its encoding — re-save it as UTF-8 from a text editor and convert again.

Text That Was Never Meant to Be Read

A page contains more words than it shows you, and some of them turn up in extraction:

  • Navigation and footer text. Menu labels, breadcrumb trails, "back to top", the eighty-link sitemap at the bottom. Legitimate text, semantically worthless. On a saved news article this can outweigh the article itself.
  • Cookie banners and consent copy. Two hundred words of legal boilerplate that appear on every page you save from that domain — which means if you're building a corpus, you're about to duplicate them a thousand times.
  • Alt text and ARIA labels. Sometimes valuable (a chart's alt text may be the only description of the data), sometimes just "image" repeated forty times.
  • Hidden elements. Screen-reader-only spans, collapsed accordion panels, and <noscript> fallbacks all contain real text in the source even though you never saw them rendered.

Best practice if the source matters: save the page from your browser's reader mode, which discards most of the furniture before it ever hits the file. Otherwise, convert and then trim the head and tail of the output. Repetitive boilerplate is easy to spot once you know to look for it, and cutting it is the highest value minute you'll spend on the whole pipeline.

Why Plain Text Beats Markdown for NLP Work

This isn't just "Markdown but simpler" — for a lot of pipelines plain text is the correct choice and Markdown is actively worse.

  • Embeddings. An embedding model encodes whatever you give it, syntax included. Pipe characters and heading hashes shift vectors without adding meaning, and they eat into the model's input limit. Clean prose embeds more cleanly.
  • Classifiers and topic models. Bag-of-words and TF-IDF approaches treat **word** and word as different tokens unless you pre-clean. Skip the problem entirely.
  • Search indexing. Most index pipelines want sentences. Feeding them Markdown means writing a stripping step you didn't need.
  • Sentence segmentation. Splitters like spaCy or NLTK work on prose. Table syntax confuses them into producing fragments.
  • Token budget. On a long page, dropping the markup meaningfully reduces the token count — the counter under the output shows you exactly how much, and comparing the two formats on the same file is a one-click experiment.

A File You Have vs a Page You Don't

This tool converts an HTML file you upload. It does not go and fetch a URL. That distinction matters more than it seems, because the two situations fail in different ways.

If your file came from a browser's Save As on a JavaScript-heavy site, it may contain almost no text — just an empty container div and a bundle script, with the actual content having been generated at runtime and never written to disk. You'll get a near-empty result and it will look like the converter broke. It didn't; the words aren't in the file. Search the source for a sentence you remember to confirm.

When that happens, use Web2Txt instead — it takes a live URL, renders the page, and extracts from the result. Use this page when you already have the file: an email export, a documentation build, a CMS dump, a report generated as HTML, an archived page from years ago.

Typical Jobs

  • Building a training or evaluation corpus from a folder of archived pages, where you want raw prose and consistent formatting across thousands of documents.
  • Readability and content audits — word counts, reading level, keyword frequency. All of these need the text without the markup skewing the numbers.
  • Piping into scripts. Plain text goes into grep, wc, a diff, or a Python one-liner without any escaping drama.
  • Summarising a long page where you don't care about structure and would rather spend the tokens on content.
  • Extracting text from an HTML file for translation or transcription work, where the translator wants sentences and nothing else.

Frequently Asked Questions

How do I convert an HTML file to text?

Drop the .html or .htm file above and the readable text comes back with every tag, script and style block stripped out. Free, no sign-up, 50 MB per file. Download it as .txt or copy it straight into whatever needed the words rather than the markup.

Can I convert a live web page by pasting a URL?

Not on this page — this one takes a file you already have. For a URL, Web2Txt fetches the page and extracts it directly, which saves the save-then-upload round trip. Use this page for pages you saved earlier, exported email bodies, or HTML generated by something local.

Does it remove navigation, ads and cookie banners?

Boilerplate is a known hazard rather than a solved problem. Scripts, styles and tags always go; whether a sidebar or a cookie notice counts as content is a judgement call, and a saved page carries all of it in the same DOM. Skim the top and bottom of the output — that is where the navigation debris collects.

What happens to links in the page?

The anchor text survives as words and the URLs behind it do not. A sentence reading "see the installation guide" converts to exactly that, with no indication of where it pointed. If the destinations matter — building a link map, checking outbound references — use HTML to Markdown, which keeps hrefs in bracket syntax.

Why is my output full of blank lines and stray characters?

Usually a page saved with its full DOM intact — hidden template blocks, JSON-LD payloads, inline SVG and analytics fragments all live in that markup and all contain text of a sort. A one-line regex clears the repeating pattern once you have spotted it, or re-save the page using the browser's reader view and convert that instead.

The Rest of the Suite

File2Txt handles every supported format from one upload box if you'd rather not choose. Or go direct: PDF to text for documents, Word to text for DOCX, EPUB to text for e-books, and CSV to text for delimited data.

Working with code? The GitHub to text converter, the GitLab converter and the local directory converter flatten a whole project into one file. And this guide covers the wider question of getting documents ready for an LLM.

Repo2Txt is built and maintained by v12hero, an independent developer building privacy-first native and web apps.