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.
Step by step
How to use HTML Entity Encoder and Decoder
Step 1: Paste text containing HTML special characters or entity references and choose Encode or Decode.
Step 2: Select Convert entities. Decoding removes one layer and shows the result as inert text, not rendered markup.
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 <p>Tom & Jerry</p>. 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.