decodeURIComponent('\u003cb\u003estring\u003c/b\u003e');
Edit - I would delete the answer above if I could.
The original question is a bit ambiguous.
console.log('\u003cb\u003estring\u003c/b\u003e'); will already give <b>string</b>
If the characters \ escaped, then instead of replacing \\ you can replace the replacement method \\ only \ , which allows you to use the correct Unicode sequence.
source share