You are here: Reference > JavaScript > client-side > HTML DOM > properties > URLUnencoded (document)

URLUnencoded property (document)

Browser support:
Returns a string value that represents the unencoded version of the location of the current document.
Use the decodeURIComponent global method on the value returned by the URL or location.href property to get the same functionality.


You can find the related objects in the Supported by objects section below.
This property is read-only.

Possible values:

String that represents the unencoded URL.
Default: this property has no default value.

Example HTML code 1:

This example illustrates the use of the URLUnencoded property:
    <script type="text/javascript">
        function GetUnEncodedURL () {
            alert ("The unencoded URL of the document: " + document.URLUnencoded);
    <button onclick="GetUnEncodedURL ();">Get the unencoded URL of the document!</button>
Did you find this example helpful? yes no

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content