var query = new URLSearchParams(); query.append("KEY", "VALUE"); var url = "http://site.com/page?" + query.toString();