({{, (RefLink[URLEncode, paclet:ref/URLEncode])["string"] 
converts "string" into a URL-style, percent-encoded ASCII string. }})

OpenersNotesSection(Spacer1)Details and Options

The string in (RefLink[URLEncode, paclet:ref/URLEncode]) can include any Unicode characters.

Any non-ASCII or reserved character is represented by its hexadecimal character code with a % prepended.

(RefLink[URLEncode, paclet:ref/URLEncode]) has option (RefLink[CharacterEncoding, paclet:ref/CharacterEncoding]), which specifies the character encoding to be used to generate character codes. The default setting is "UTF-8".

The first argument of (RefLink[URLEncode, paclet:ref/URLEncode]) can be a string, a number, or the following special forms:

OpenersPrimaryExamplesSection(Spacer1)Examples  (5)

OpenersExampleSection0(Spacer1)Basic Examples  (4)

Encode string with percent encoding using specified encoding:

URLEncode["Hello, World!"]

(RefLink[URLEncode, paclet:ref/URLEncode]) threads over lists:

URLEncode[{"Kurt Gödel", "Paul Erdős"}]

(RefLink[None, paclet:ref/None]) or (RefLink[Missing, paclet:ref/Missing]) is transformed into an empty string:

URLEncode[None]

URLEncode[Missing["KeyAbsent","MissingKey"]]

Integers and machine-precision numbers are converted into strings:

URLEncode[1]

URLEncode[1.3]

(RefLink[URL, paclet:ref/URL]) or (RefLink[CloudObject, paclet:ref/CloudObject]) can be used:

URLEncode[CloudObject[]]

URLEncode[URL["http://www.wolfram.com"]]

OpenersExampleSection1(Spacer1)Options  (1)

OpenersExampleSubsection0(Spacer1)CharacterEncoding  (1)

Encode string with percent encoding using specified encoding:

URLEncode["Eötvös Loránd University", CharacterEncoding->"MacintoshRoman"]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[URLDecode, paclet:ref/URLDecode])  ▪  (RefLink[URLQueryEncode, paclet:ref/URLQueryEncode])  ▪  (RefLink[URLBuild, paclet:ref/URLBuild])  ▪  (RefLink[URLParse, paclet:ref/URLParse])  ▪  (RefLink[FromCharacterCode, paclet:ref/FromCharacterCode])  ▪  (RefLink[Transliterate, paclet:ref/Transliterate])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[URL Manipulation, paclet:guide/URLManipulation])}, {▪(RefLinkPlain[String Manipulation, paclet:guide/StringManipulation])}, {▪(RefLinkPlain[Web Operations, paclet:guide/WebOperations])}, {▪(RefLinkPlain[Operations on File Names, paclet:guide/OperationsOnFileNames])}, {▪(RefLinkPlain[Character Operations, paclet:guide/CharacterOperations])}, {▪(RefLinkPlain[Systems-Related String Operations, paclet:guide/SystemsRelatedStringOperations])}, {▪(RefLinkPlain[HTTP Requests & Responses, paclet:guide/HTTPRequestsAndResponses])}})}})