Convert HTML files to text

To convert an HTML page into a pure text file, only one solution: Copy some text and paste it into a notepad. It’s simple, fast and effective. But what if, for example, you need to convert hundreds, thousands, or even millions of HTML pages into text files?

No, no need to hire someone to do this ungrateful copy-paste job, all you need is a little software from Nirsoft called HTMLAsText which allows you to remove tags from HTML files (including scripts) located in a directory and apply the layout you want. For example, you choose the quantity of letters per line, the post-title space, if you want centering, the formatting of tables and lists, etc.



HTMLAsText utility converts HTML documents to simple text files, by removing all HTML tags and formatting the text according to your preferences.


  • HTMLAsText automatically removes all tags and scripts from the document.
  • The remained text is formatted according to the number of characters per line that you select.
  • All HTML entities (e.g.: &amp, &lt) are converted into the corresponding ASCII characters.
  • Unordered lists (<ul> tag) and ordered lists (<ol> tag) are formatted accordingly. The bullets beside the items of unordered lists are replaced by ASCII characters according to your selection.
  • Definition lists are formatted by adding spaces in the left side of the definition lines.
  • Optionally, centered and right-aligned paragraphs are formatted accordingly by adding space characters in the left side of the lines.
  • Optionally, HTMLAsText allows you to add a line under each heading (<h1> – <h6> tags)
  • Simple tables can be delimited by spaces, tab characters, commas, or CRLF.
  • Preformatted text blocks (<pre> tag) are copied “as is”, without formatting the text.
  • You can convert multiple HTML files in the same folder at once, by using wildcard. (e.g.: c:\files\*.html)
  • You can run the conversion process without displaying any user interface, by using the /run command-line option.
See also  How to Prevent Remote Desktop Access on Your Network

It can be useful in your processing procedures, especially since the tool can be used on the command line.

If you liked this article, please subscribe to our reddit community to discuss it. You can also find us on Twitter and Facebook.

5/5 - (1 vote)

Newsletter Updates

Enter your email address below to subscribe to our newsletter

Leave a Reply