Javascript decodeURIComponent() decode URL query parameters
decodeURIComponent()
function decodeQueryParam(p) { return decodeURIComponent(p.replace(/\+/g, ' ')); } let a = decodeQueryParam('search+query%20%28test%29'); console.log(a);//from ww w .j a v a2 s. c o m