Skip to content
FileConvertify
Tools

HTML Entity Encoder and Decoder

Encode HTML special characters or decode named and numeric entities. Your input stays in your browser.

  • Free, no sign-up
  • Text stays in your browser
  • Local processing / no upload

Limit: 500,000 character units per input. Oversized pastes are rejected. Drafts stay in this page and are not saved.

Tool options

Step by step

How to use HTML Entity Encoder and Decoder

  1. Step 1: Paste text containing HTML special characters or entity references and choose Encode or Decode.

  2. Step 2: Select Convert entities. Decoding removes one layer and shows the result as inert text, not rendered markup.

  3. Step 3: Review the destination context before copying. Entity conversion does not sanitize HTML or provide escaping for JavaScript and URL contexts.

Example to try

Choose Decode and enter &lt;p&gt;Tom &amp; Jerry&lt;/p&gt;. The output is the literal text <p>Tom & Jerry</p>; it is not rendered as a paragraph.

Represent special characters as text

HTML uses characters such as ampersand, less-than and quotation marks as part of its markup syntax. Entity encoding represents those characters with references so a text value can be inspected or transported in an HTML-related workflow. The encoder uses a maintained entity library and named references when available. It can also encode non-ASCII characters into suitable references without losing the original Unicode value.

Decode entities without rendering markup

Decode recognizes named references as well as decimal and hexadecimal numeric references. The result is always displayed in a plain-text output field. A decoded script element, event handler or image tag is never attached to this page as HTML. Decoding removes one encoding layer; repeatedly encoded input may need a second deliberate run if that is what your source format requires.

Output limits and local processing

Copying decoded text into an HTML editor can cause that other application to interpret it as markup, even though this tool did not render it. Choose the appropriate encoding for your destination rather than assuming entity conversion is suitable for JavaScript, CSS or URL contexts. Keep the source available so you can verify exactly which encoding layer was removed.

Inputs and results are held only in this page's memory. Developer inputs accept up to 500,000 character units each. Oversized pastes are rejected while preserving the previous input. Generated output is limited to 5,000,000 character units. No sign-up is needed. Copy and download actions are explicit; the tool does not upload your drafts or save them for a later visit.

Frequently asked questions

Will decoded HTML run?
No. Both the preview and download are plain text. Decoded elements are not inserted into the page DOM as markup.
Does this sanitize HTML?
No. Encoding or decoding entities is not a general HTML sanitizer. Apply the security rules for the destination where you use the output.
Are numeric references supported?
Yes. Decode handles decimal references such as &#65; and hexadecimal references such as &#x41;, as well as supported named entities.
Why does an ampersand remain after decoding?
Only one layer is decoded per run. Unknown or incomplete references may also remain according to the library's HTML decoding rules.