HTML Decode

HTML Decode


The htmlDecode function is used to render all the HTML entities in the input string to HTML. To perform reverse operation, i.e., encode a HTML text to HTML entities, use htmlEncode function.

  • The size of the supplied input text and the returned output text can individually be up to 300KB.
  • This function supports until the HTML 4 version.


<response> = <data>.htmlDecode();
<response> = htmlDecode(<data>);


ParamsData typeDescription



Specifies the response that represents the decoded HTML data



Specifies the input HTML text whose special HTML characters are encoded that will be decoded

Example 1: Decode a text with HTML entities to HTML

The following script decodes the input text such that all the HTML entities will be transformed into respective HTML characters.

response = htmlDecode("Your order is ready&lt;br /&gt;Thank you.");


The TEXT response that represents the decoded data. This example returns - Your order is ready<br />Thank you.
"Your order is ready&lt;br /&gt;Thank you."
The TEXT that represents the input with HTML entities that will be decoded

Related Links

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: