Encode URL

Encode a string for safe use in a URL by escaping special characters.

Code

Utilities
from urllib.parse import quote
return quote(str, safe='')

Parameters

The string to encode.

Server

More Python Snippets