JavaScript unescape() Function Last Updated : 11 Jul, 2025 Comments Improve Suggest changes 3 Likes Like Report The Javascript unescape() function in JavaScript takes a string as a parameter and uses it to decode that string encoded by the escape() function. The hexadecimal sequence in the string is replaced by the characters they represent when decoded via unescape(). Note: The unescape() function is deprecated. Syntax:unescape(string)Parameters: string: This parameter holds the string that will be decoded. Return value: This function returns a decoded string. Note: This function only decodes the special characters, this function is deprecated. Prerequisite: JavaScript escape() Function Example 1: In this example, we will decode a simple encoded content using the unescape() function. javascript // Special character encoded with // escape function console.log(unescape("Geeks%20for%20Geeks%21%21%21")); // Print encoded string using escape() function // Also include exceptions i.e. @ and . console.log(unescape("To%20contribute%20articles%20contact" + "%20us%[email protected]")); OutputGeeks for Geeks!!! To contribute articles contact us [email protected] Example 2: In this example, we will decode a simple encoded content using the unescape() function. javascript // Special character encoded with // escape function let str = escape("Geeks for Geeks!!!"); console.log("Encoded : " + str); // unescape() function console.log("Decoded : " + unescape(str)) // The exception // @ and . not encoded. str = escape("To contribute articles contact us" + "at [email protected]") console.log("Encoded : " + str); // unescape() function console.log("Decoded : " + unescape(str)) OutputEncoded : Geeks%20for%20Geeks%21%21%21 Decoded : Geeks for Geeks!!! Encoded : To%20contribute%20articles%20contact%20usat%[email protected] Decoded : To contribute articles contact usat ...Exceptions: @ - + . / * _ We have a complete list of Javascript Functions, to check those please go through Javascript Function Complete reference article. Supported Browsers: Google Chrome 1 and aboveEdge 12 and aboveInternet Explorer 3 and aboveMozilla Firefox 1 and aboveSafari 1 and aboveOpera 3 and above Create Quiz Comment S ShivamKD Follow 3 Improve S ShivamKD Follow 3 Improve Article Tags : JavaScript Web Technologies javascript-functions Explore JavaScript BasicsIntroduction to JavaScript4 min readVariables and Datatypes in JavaScript6 min readJavaScript Operators5 min readControl Statements in JavaScript4 min readArray & StringJavaScript Arrays7 min readJavaScript Array Methods7 min readJavaScript Strings5 min readJavaScript String Methods9 min readFunction & ObjectFunctions in JavaScript5 min readJavaScript Function Expression3 min readFunction Overloading in JavaScript4 min readObjects in JavaScript4 min readJavaScript Object Constructors4 min readOOPObject Oriented Programming in JavaScript3 min readClasses and Objects in JavaScript4 min readWhat Are Access Modifiers In JavaScript ?5 min readJavaScript Constructor Method7 min readAsynchronous JavaScriptAsynchronous JavaScript2 min readJavaScript Callbacks4 min readJavaScript Promise4 min readEvent Loop in JavaScript4 min readAsync and Await in JavaScript2 min readException HandlingJavascript Error and Exceptional Handling6 min readJavaScript Errors Throw and Try to Catch2 min readHow to create custom errors in JavaScript ?2 min readJavaScript TypeError - Invalid Array.prototype.sort argument1 min readDOMHTML DOM (Document Object Model)8 min readHow to select DOM Elements in JavaScript ?3 min readJavaScript Custom Events4 min readJavaScript addEventListener() with Examples9 min readAdvanced TopicsClosure in JavaScript4 min readJavaScript Hoisting6 min readScope of Variables in JavaScript3 min readJavaScript Higher Order Functions7 min readDebugging in JavaScript4 min read Like