Insert this code <script> (function(w, undefined){ var OBF = { offset: -5, //change this range: 11, //change this process: function( s, d){ var out = '',i; for(i=0;i<s.length;i++){ out += String.fromCharCode( s.charCodeAt(i) + d*this.offset + d*(i%this.range) ); }; return out; } ,encode: function(s){ return this.process(s, 2); } ,decode: function(s){ return this.process(s,-2); } }; w.OBF = OBF; })(window); function enc(str, encoding = 'utf-8') { return btoa(str); } function dec(str, encoding = 'utf-8') { return atob(str); } var test = "al1tcA=="; //change variable and obfuscated text </script> How include in HTML <text id="test"></text> <script>document.getElementById("test").innerHTML = OBF.decode(dec((p)));</script> How to encode text console.log (enc(OBF.encode( 'your text' ))); Decode obfuscated text console.log ('obf to raw = ' + OBF.decode(dec('al1tcA==')) );