<% response.write(Server.URLEncode("https://www.w3schools.com/lab")) %> Output: https%3A%2F%2Fwww%2Ew3schools%2Ecom