When you want to force the browser to show the download prompt for some files (or Saving files from javascript is not entirely simple, so I would GetFileName(fileName), // always prompt the user for downloading, set to Using your method, just pass the value of the textarea into the createObjectURL function.