{"id":1211,"date":"2023-05-21T07:05:30","date_gmt":"2023-05-21T07:05:30","guid":{"rendered":"https:\/\/itnotes.apjsoftwares.com\/?p=1211"},"modified":"2023-05-21T07:05:38","modified_gmt":"2023-05-21T07:05:38","slug":"what-are-the-decodeuri-and-encodeuri","status":"publish","type":"post","link":"https:\/\/itnotes.apjsoftwares.in\/index.php\/2023\/05\/21\/what-are-the-decodeuri-and-encodeuri\/","title":{"rendered":"What are the decodeURI() and encodeURI()?"},"content":{"rendered":"\n<p>EncodeURl() is used to convert URL into their hex coding. And DecodeURI() is used to convert the encoded URL back to normal.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;script&gt;\n   var uri=\"my test.asp?name=st\u00e5le&amp;car=saab\";\n\n   document.write(encodeURI(uri)+ \"&lt;br&gt;\");\n\n    document.write(decodeURI(uri));\n&lt;\/script&gt;\n<\/pre>\n\n\n\n<p><strong>Output \u2013<\/strong><\/p>\n\n\n\n<p>my%20test.asp?name=st%C3%A5le&amp;car=saab<\/p>\n\n\n\n<p>my test.asp?name=st\u00e5le&amp;car=saab<\/p>\n","protected":false},"excerpt":{"rendered":"<p>EncodeURl() is used to convert URL into their hex coding. And DecodeURI() is used to&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[23],"tags":[],"_links":{"self":[{"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/posts\/1211"}],"collection":[{"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/comments?post=1211"}],"version-history":[{"count":1,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/posts\/1211\/revisions"}],"predecessor-version":[{"id":1212,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/posts\/1211\/revisions\/1212"}],"wp:attachment":[{"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/media?parent=1211"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/categories?post=1211"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/tags?post=1211"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}