text tool
HTML to text converter
Paste HTML source, or copy part of a web page and paste it, and you get readable plain text back with every heading, list item and table row on its own line. Scripts, styles and hidden elements are dropped, and the page tells you how many of each.
Loading the tool…
- Runs on your device, nothing is uploaded
- Free, no sign in
- No watermark, no file limit
How it works
- 1
Paste HTML or a copied page
Paste into the HTML box. Copying from a web page pastes the page's own markup, and the label says it came from a page. Open an .html file works too.
- 2
Read the plain text beside it
The Plain text pane updates as you type. The line under it counts the words, headings and list items kept.
- 3
Choose how headings, links and images appear
Set headings to plain lines or # marks, and tick the boxes to show link addresses, keep image alt text or start with the page title.
- 4
Copy or download
Copy the text puts it on your clipboard, and Download .txt saves it as a UTF-8 file.
Lines come from the structure, not the source
Stripping tags with a search and replace gives you every word run together, because the line breaks in HTML source mean nothing; a browser lays text out from the elements. So this converter reads the elements. A paragraph becomes a block with a blank line after it, a br becomes a line break, and a heading sits on its own line with space around it. List items start with a hyphen, or with their number in an ordered list, counting from the start attribute when the list has one, and a list inside a list is indented two spaces per level. A table row becomes one line with a tab between cells, so pasting the result into a spreadsheet puts each cell back in its own column. Text in a pre block keeps its spacing exactly.
Pasting from a web page
When you copy part of a web page, the browser puts two versions on the clipboard: the plain text and the HTML behind it. A normal text box takes the plain version, which loses list markers and runs headings into paragraphs. This box takes the HTML version instead and converts it with the rules above, so a copied article keeps its shape. The note beside the label says pasted from a page when that happened. To paste the plain version on purpose, use your browser's paste as plain text command, usually Ctrl+Shift+V or Cmd+Shift+Option+V.
What gets dropped, and how to check
Script, noscript and template blocks are removed with their contents, as are style tags, embedded media, SVG drawings, iframes and form controls such as inputs, buttons and dropdowns. Anything marked hidden, aria-hidden or styled display:none or visibility:hidden inline is removed too, since a reader would never see it. The note under the result lists how many of each went, so a page full of hidden menus does not quietly vanish without you knowing. Entities such as & and are decoded into the characters they stand for.
Links, images and the page title
By default a link keeps only its words, which is what most copy needs. Tick Show link addresses and each web, email or phone link is followed by its address in brackets, unless the words already are the address. Relative links such as /book are left out because they mean nothing outside the site. Images contribute nothing unless you tick Keep image alt text, which writes [Image: ...] with the description the page gave. Start with the page title adds the contents of the title tag as the first line, which is useful when converting a saved page.
Limits worth knowing
The HTML is parsed into an inert copy that has no stylesheets, so anything a stylesheet hides with a class, such as a closed menu or a cookie banner, is kept as text. Delete those lines from the result, or remove them from the source first. Content a page loads with JavaScript after it opens is not in its source at all. A page of a megabyte or two converts in well under a second on a laptop. Nothing is uploaded and nothing is stored, ever, and nothing in the HTML can run.
Limits
- Scripts, styles and elements hidden with the hidden attribute, aria-hidden or an inline display:none are dropped. An element hidden by a class in a stylesheet is kept, because the stylesheet is never loaded.
- Text inside images is not read. Tick Keep image alt text to keep the description the page gives each image instead.
- Form fields, buttons, embedded video, SVG drawings and iframes are dropped as a whole.
- Pasting from a page only brings the HTML when the browser puts it on the clipboard, which desktop Chrome, Edge, Firefox and Safari do. Otherwise the plain text arrives as typed.
What it does not do
- It does not fetch a page from its address. Paste the source or a copied selection.
- It does not run any script in the HTML or load any image, font or stylesheet it names.
- It does not convert to Markdown beyond optional # marks on headings and - markers on lists.
- It does not upload or store what you paste.
Questions people ask
Is it safe to paste HTML that contains scripts?
Yes. The HTML is handed to the browser's DOMParser, which builds a document that is never displayed. In that kind of document scripts do not run, event handlers such as onload do not fire, and images, fonts and stylesheets are never requested. The converter then reads only the text, and the script blocks are counted and thrown away rather than copied into the result.
How do I paste web page text into a form or a survey without the formatting?
Copy the questions from the page, paste them here, and copy the plain text result. Each question lands on its own line with list markers kept, which is the shape a form generator or a bulk options box expects. Pasting straight from a page into most fields brings either messy styling or every line run together, and this step removes both.
Why are some menu items still in my text?
Menus that open on hover or on a click are usually hidden by a class in the site's stylesheet. The stylesheet is never loaded here, so the converter cannot know those items are hidden and keeps them. Elements hidden with the hidden attribute, aria-hidden or an inline display:none are removed. Delete the leftover menu lines from the result, or copy only the article itself.
Can I convert a saved .html file?
Yes. Press Open an .html file and pick a page saved from your browser or exported from an email tool. The file is read on your device, its source appears in the HTML box, and the text is converted at once. A page saved as complete also saves a folder of images and scripts beside it, and none of those are opened.
Why do table cells come out separated by tabs?
Tabs are what spreadsheets and most editors understand as a column break. Paste the converted rows into a spreadsheet and each cell lands in its own column, which commas cannot promise when the cell text contains commas. In a plain text editor the tabs line the columns up roughly. If you need a Markdown table instead, the markdown table generator takes pasted tab separated rows.
Paste the questions into a form
Take what you made here into forms.
Create a form with OneCraftMore tools like this
- Remove extra spaces from textRemove extra spaces from text: double spaces, tabs, trailing spaces, special spaces and runs of blank lines, each rule a switch, with hidden characters shown.
- Find and replace onlineFind and replace online with plain text or JavaScript regex. Every match is highlighted and counted, and capture groups like $1 work in the replacement.
- Keyword density checkerA keyword density checker for drafts and pages: one, two and three word phrases with counts and percentages, stopwords removed, and a focus keyword check.
- Markdown table generatorA Markdown table generator: type into a grid or paste CSV or spreadsheet cells, set each column's alignment, and copy a padded GitHub flavoured table.
- PDF text extractorThe page on one side, its text on the other, editable. Fix the reading order by hand, search it, then copy or download as txt, Markdown or JSON. Not uploaded.
Built with DOMParser (built into the browser) (Web standard).
Written and checked by the OneCraft team. Last checked .