If we were on a nodeJS server, we could write a header, set a mime type, and send it: res.header("Content-Disposition", "attachment;filename="+name+".csv"); res.type("text/csv"); res.send(200, csvString); and because of the headers, the browser will create a download for the named csv file. When useful data is generated in a browser, one solution to getting it in a CSV file is to use ajax, upload
