Replace <b> and </b> with space " " and <br> with \n
var a = "Welcome to xyz. You have been added as a manager by <b>Adam </b>.<br><br><b>Dashboard Link:</b> https://app.xyz.com <br><br>Use the credentials below to sign-in: <br><b>Username : </b>[email protected]<br><b>Password : </b>qwerty";
var b = a.replace("<b>|</b>"," ").replace("<br>","\n");
console.log(b);
"<b>|</b>"replaces literal strings"<b>|</b>". You need a regex here./<b>|<\/b>/g.