Encodes a string to be used in a URL.
The string to encode
The encoded string
const encoded = urlencode("Hello, world! - 95% ethanol");// Returns a value with only safe characters:// "Hello%2C+world%21+-+95%25+ethanol" Copy
const encoded = urlencode("Hello, world! - 95% ethanol");// Returns a value with only safe characters:// "Hello%2C+world%21+-+95%25+ethanol"
Encodes a string to be used in a URL.