Test urlencode() PHP Function - Encoding URL Strings

When non-alphanumeric characters are presented in user data to be included as part of a Web page address, they need to be encoded into the percent (%) sign format as required by the application/x-www-form-urlencoded standard. This page allows you to learn and test the urlencode() function to perform URL encoding.

What is URL Encoding?

URL encoding is an Internet standard defined in RFC1738 to protect special characters as part of user data included Web URL strings. URL encoding requires that all non-alphanumeric characters except -_. to be replaced with a percent (%) sign followed by two hex digits and spaces replaced as plus (+) signs. For example,

String: $99.99 and 10% tax
URL encoded: %2499.99+and+10%25+tax

How to use and test urlencode() PHP function?

urlencode(string) converts the input string according to the URL encoding rules.

To help you learn and test urlencode() function, FYIcenter.com has designed this online testing page. All you need to do is to enter the testing string in the form below and click the Start button. The converted string will be presented in the result area.


Popup Windows Tutorials

20 tutorials on different ways to create and test popup windows created in JavaScript: Page unload popups, Pop re-open on close, ...

200+ PHP Script Tutorials

Each tutorial answers one commonly asked PHP programming question with a short, but precise and clear PHP script.