URL encoding
URL encoding
URL encode / double-encode
Percent encoding represents a byte as % followed by two hexadecimal digits. quote(..., safe="") encodes reserved URL characters, while quote_plus() also represents a space as +, matching form-style query encoding. Double encoding applies the same transformation twice, so %2F becomes %252F because the % character is encoded during the second pass.
from urllib.parse import quote, quote_plus, unquote, urlencode
input_path = "a b/c?d"
encoded_path = quote(input_path, safe="")
traversal_path = "../etc"
encoded_once = quote(traversal_path, safe="")
encoded_twice = quote(encoded_once, safe="")
form_value = quote_plus("a b")
decoded_path = unquote("%2Fetc%2Fpasswd")
query_parameters = {
"q": "' or 1=1",
"p": 2
}
query_string = urlencode(query_parameters)Find by: url encode, urlencode, quote, percent encoding, double encoding, unquote, plus, waf bypass, special chars, escape