HTML to Text
Paste markup in one pane and read the plain text in the other: headings, paragraphs, list items, table rows one line each with a tab between the cells, preformatted blocks with their spacing intact, and the alternative text of images. What this page does that the others on this search do not is prove what it did not do. The markup is never handed to a browser parser and never rendered, it is read as characters, so a script is skipped without running and nothing the markup points at, no image, stylesheet, font or link target, is ever loaded. Every script, style, head element, comment, embedded element and form control that came out is counted in a short footer beside the text, and the last line of that footer is the number of network requests the extraction made, which is zero. You choose how blocks are separated, a blank line, one newline or one line, and whether a link keeps its target, loses it, or gets a number and a list at the end.
This run will separate blocks with a blank line, and keep each link target after its words.
3 blocks, 29 characters, 5 words, style element dropped, 0 network requests made.
- First paragraph. Second paragraph.
- Jack & Jill & the <b> tag
- Pricesscript element dropped, style element dropped
Up to 2 MB of markup in one pass, read here in your browser with nothing uploaded and no account. What comes out is the reading matter: headings, paragraphs, list items, table rows one line each with a tab between cells, preformatted blocks with their spacing, and the alternative text of images. Nothing is added that was not text: no bullet characters, no heading marks. Markup nested more than 400 deep is refused rather than read part way. Your two choices and your draft are kept in this browser alone, drafts up to 200,000 characters, and the Start over button above the tool forgets both.
Common questions
- Does this page run the HTML I paste, or load anything in it?
- Neither, and neither can happen by accident. The markup is never handed to a browser parser, because a parsed node is one attribute away from requesting an image, a font or a stylesheet from a host that then knows your paste exists. It is read as characters instead, into a tree of plain objects that has no page to live in, so an image source, a stylesheet link, a font or a link target is read without ever being resolved. That is why the readout cell marked Requests made is a constant rather than a counter: there is no code path on this page that could raise it above zero. The contents of a script or a style element are skipped as characters before anything else looks at them, so nothing inside either one is ever evaluated.
- What happens to a script, a style or the head of the page?
- Each one is dropped, and each one is counted. Under the extracted text you get a short footer: for the sample this page opens with it reads style element dropped, then 0 network requests made. The same goes for an iframe, a video, a canvas, a form control, an HTML comment and the head elements title, meta, base and link. The counts are grouped by kind and always printed in the same order, so the same markup reads the same way twice, and a drop is something you are told about rather than something you find missing later. The footer sits beside the text, never inside it: Copy and Download take the text alone.
- What do the line break and link settings change?
- The line break setting decides what goes between two blocks: a blank line, one newline, or a single space that puts the whole document on one line. The block count in the readout stays the same either way, because it counts the blocks the markup had, not the lines the layout produced. The link setting decides what happens to a target. Keep it and a link comes out as the words, then the target in brackets: the notes (https://example.com/page). Drop it and you get the words alone. Number it and the text carries the notes [1] while the targets are listed under the text, one per line, starting with [1] https://example.com/page. A target that appears twice gets one number, not two.
- Are entities decoded, and can they be decoded twice?
- They are decoded exactly once, in one left to right pass, and what comes out of that pass is never read again. So the source text &amp; becomes the five characters & rather than a bare ampersand, and & becomes one ampersand. Named references, numeric ones such as A and hexadecimal ones such as B all decode; a name the list does not hold, say ¬real;, is left exactly as it was written. A reference asking for a character that no text may hold, a surrogate half or a code point past the top of Unicode, becomes the replacement character rather than an error. Decoding is not parsing: text that arrived as <b> comes out as the three characters of a tag and stays text, because the decode happens after the markup has already been read.
- What happens to lists and tables?
- A list item is a block of its own, so a five item list is five blocks separated by whatever line break rule you picked. A table comes out one row per line with a tab between the cells, which is what a spreadsheet reads back as columns: a row of two cells holding a and b comes out as a, a tab, then b. A caption is a block above the rows, and a cell holding two paragraphs is joined into one line, because a row is one line. Header cells are not marked out from body cells, because a bold weight is not something plain text can carry.
- Why are there no bullet points or heading marks in the output?
- Because a bullet character was never in your document: it was the browser drawing a list. This page takes out what is text and adds nothing that is not, which is what lets the output drop straight into an email, a spreadsheet cell, a subtitle file or a prompt. If you want the structure written down instead, hyphens for bullets, hashes for headings, pipes for tables, that is a different job and the HTML to Markdown page on this site does it.
- How much HTML can it take at once, and is any of it kept?
- Up to 2 MB, which is 2,097,152 bytes of UTF-8, and a large article is a small fraction of that. Past the ceiling the page says how large your paste is in bytes and how large it may be, and extracts nothing until you split it up: it never truncates, because a converter that silently dropped the end of your document would be worse than one that refused it. Markup nested more than 400 elements deep is refused the same way, with the depth named. Your two settings and your draft are kept on this device alone, up to 200,000 characters of draft; a longer paste still extracts in full and is simply not stored, and the Start over button above the tool forgets both.
- Can I paste a whole page saved from my browser?
- Yes, and that is the case this was built for. The head goes: title, meta, base and stylesheet links are counted and dropped, because they describe the page rather than its content. A wrapper with no meaning of its own, a div, a section, an article, a header or a footer, is unwrapped and its text kept, so what is left is the reading matter. Tags left unclosed, and end tags that cross one another, are read rather than refused: the end tags HTML lets you leave out are filled in, so a page written by hand in 2003 still comes out as text. A link whose target is a javascript, vbscript, data or file URL keeps its words and loses the target, and that drop is counted too: a target that runs code is not something this page will write into a text file for you.
The markup is parsed into an inert document that runs no script and fetches no image, stylesheet or font, so pasting HTML from a stranger costs you nothing. Entities are decoded exactly once, so a literal & survives as one ampersand. Block elements are separated by the newline rule you pick, and links are kept or dropped as you choose. Up to 2 MB.