I am sharing a simple example here that explains how easily you can save your form data in a text file or in a .txt file using JavaScript. createElement("a"); newLink.download = sFileName; if (window.webkitURL != null) { newLink.href This page shows examples of messages formatted using JSON (JavaScript Object Notation). The same text expressed as XML: