Switch language: Simplified Chinese

URL encode / URL decode

The encodeURI() and encodeURIComponent() methods encode the URI for sending to the browser. Certain characters, such as spaces, cannot be included in a valid URI. These two URI encoding methods can encode URIs. They replace all invalid characters with special UTF-8 encoding, so that the browser can accept and understand them.

Original URL:

The result of only encoding the parameter:

The result of encoding the complete url: