const params = { name: 'John Doe', profession: 'Web Designer', age: 29 } const qs = '?' + new URLSearchParams(params).toString() console.log(qs) // ?name=John+Doe&profession=Web+Designer&age=29