HTML to Text Converter: Turn HTML into Clean Plain Text
Paste HTML or load a saved .html file and get readable plain text: paragraphs, lists, quotes, aligned tables, and links as inline URLs or numbered footnotes, with optional word wrap. Conversion runs on a built-in HTML parser in this page. Nothing is uploaded and no scripts in your HTML are run.
Output options
Ready. Paste HTML, open a file, or load the sample.
You can also drop an .html file here. Ctrl+Enter (or Cmd+Enter) converts. Inputs over 300,000 characters update only when you press Convert.
Output is shown without soft wrapping so table columns stay aligned. Lines end with LF.
Stats
- HTML chars
- 0
- HTML words
- 0
- Text chars
- 0
- Text words
- 0
- Text lines
- 0
Characters are Unicode code points. Words are runs of non-space characters; HTML counts include the markup.
Parse diagnostics
- No input yet.
How it works and limits
- Own parser. A tokenizer and tree builder written in this page follow the main WHATWG HTML parsing rules: void elements, implied end tags for
p,li,dd/dt, table rows and cells, comments, doctype, CDATA inside SVG and MathML, quoted and unquoted attributes, and raw-text elements. It does not hand your markup to the browser’s own HTML parser, and it never runs or fetches anything from your HTML. - Not a full HTML5 tree builder. Misnested formatting tags such as
<b><i></b></i>are closed at the first matching end tag (no adoption-agency reconstruction), and stray text inside a table is printed before the table rather than exactly where a browser would move it. - Dropped content.
script,style,template,noscript,iframe, form fields, media fallback, and SVG titles are removed.title(optional) andtextareacontents are kept as text. Closed<details>content is kept. - Hidden content (best effort). Skips elements with the
hiddenattribute,aria-hidden="true", or an inlinestylecontainingdisplay: noneorvisibility: hidden. Stylesheets and classes are not evaluated, so content hidden by CSS rules elsewhere still appears. - Character references. Decimal and hex references are decoded with the HTML rules (invalid code points become U+FFFD, 0x80–0x9F map through Windows-1252). The named table has several hundred names: all HTML 4 entities plus common HTML5 punctuation, arrows, math, Latin Extended-A letters, and box drawing. The full HTML5 list has 2,231 names; unknown names are left as written and listed in the diagnostics.
- Whitespace. Spaces, tabs, and newlines collapse as in CSS
white-space: normal;pre,textarea,listing, andxmpkeep spacing exactly. Non-breaking spaces are kept unless you turn on the option. - Links and tables. Links to
#fragmentsandjavascript:are shown as text only, a link whose text is already its URL is not repeated, andmailto:is shown as the address. Relative URLs are shown as written. Column alignment counts code points, so wide CJK characters and emoji can misalign columns. Table cells are never wrapped. - Files. Files are read locally. The encoding comes from a byte-order mark or a
<meta charset>in the first 1,024 bytes, otherwise UTF-8. Files over 25 MB are refused.