You asked several questions at once, why the request code, there are no problems in it. The question is how to save a string in localStorage, because a string is the same binary data, you will just have a problem if you copy it because of the zero byte. In general, the essence is simple, convert blob to Uint8Array, go through the bytes extracting numbers and save them in the characters of the string text += String.fromCharCode(var_Uint8Array[i]) save the string in localStorage, it's elementary simple. Well, and the encoding should be eight-bit accordingly.