Sample code for 30+ languages & platforms
VB.NET

URL Encoding and Decoding

Demonstrates URL encoding/decoding using the HTTP convenience methods.

Chilkat VB.NET Downloads

VB.NET
Dim http As New Chilkat.Http

Dim s As String = "Hello World! 100% sure."

Dim encoded As String = http.UrlEncode(s)
Debug.WriteLine("URL encoded: " & encoded)

' Space → %20
' ! → %21
' % → %25

Dim decoded As String = http.UrlDecode(encoded)
Debug.WriteLine("URL decoded: " & decoded)

' Output:

' URL encoded: Hello%20World%21%20100%25%20sure.
' URL decoded: Hello World! 100% sure.