URLEncode

URLEncode["string"]
converts into a URL-style, percent-encoded ASCII string.

Details and OptionsDetails and Options

  • The string in URLEncode can include any Unicode characters.
  • Any non-ASCII or reserved character is represented by its hexadecimal character code with a prepended.
  • URLEncode has option CharacterEncoding, which specifies the character encoding to be used to generate character codes. The default setting is .
  • The first argument of URLEncode can be a string, a number, or the following special forms:
  • None,Null,Missing""
    True"true"
    False"false"

ExamplesExamplesopen allclose all

Basic Examples  (3)Basic Examples  (3)

Encode string with percent encoding using specified encoding:

In[2]:=
Click for copyable input
Out[2]=

URLEncode threads over lists:

In[1]:=
Click for copyable input
Out[1]=

None or Missing are transformed into an empty string:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Integers and machine-precision numbers are converted to strings:

In[3]:=
Click for copyable input
Out[3]=
In[4]:=
Click for copyable input
Out[4]=
Introduced in 2014
(10.0)
Translate this page: