What is a TXT file and how to create a TXT file | Adobe Acrobat
For developers, you can use the Blob API to generate and trigger a text file download directly from the browser without a server.
You can easily convert or save any HTML code as a text file using basic software already on your computer: