SyntaxFix
Write A Post
Hire A Developer
Questions
Use btoa() for encode and atob() for decode
btoa()
atob()
text_val:any="your encoding text";
Encoded Text: console.log(btoa(this.text_val)); //eW91ciBlbmNvZGluZyB0ZXh0
console.log(btoa(this.text_val)); //eW91ciBlbmNvZGluZyB0ZXh0
Decoded Text: console.log(atob("eW91ciBlbmNvZGluZyB0ZXh0")); //your encoding text
console.log(atob("eW91ciBlbmNvZGluZyB0ZXh0")); //your encoding text