PHP urlencode() & urldecode() Functions

urlencode(string) —  This PHP function is encodes a string to be used in a query part of a URL.  URL encoding is used when placing text in a query string to avoid it being confused with the URL itself. It is normally used when the browser sends form data to a web server.

urldecode(string) — This PHP function is decodes the query part of a URL string. URL encoding is used when placing text in a query string to avoid it being confused with the URL itself. It is normally used when the browser sends form data to a web server.

Try it here. Enter your string below:
e.g. An input of "Aardvarks lurk, OK?" will produce
%22Aardvarks+lurk%2C+OK%3F%22 for urlencode() and
visa versa for urldecode().


Function Result
Test String:
urlencode() Result:
urldecode() Result: