function BinaryToText(binaryString) { var text = ''; for (var i=0; i<(binaryString.length/8); i++) { var word = binaryString.substr(i*8,8); word = parseInt(word,2); text += String.fromCharCode(word); } return text; }