This tool converts the characters that have special meaning in HTML — &, <, >, " and ' — into entities such as <, so code snippets and user text display literally instead of being treated as markup. Optional modes also encode accented letters, symbols and emoji as named or numeric entities for systems that only accept plain ASCII.
Switch to Decode to reverse it: named entities like and é and numeric ones like © or 😀 become normal characters again. Conversion is live and local, so you can paste templates or email HTML without sending them anywhere.
How to use the HTML Encode / Decode tool
- Choose Encode or Decode.
- Paste your text, HTML or entity-encoded string.
- For encoding, choose which characters to convert and whether to use hex numbers.
- Copy the result, or use Use result as input to reverse it.
Why use ToolOrca HTML Encode / Decode
- Encode the five HTML special characters
- Optional named or numeric entities for all non-ASCII
- Decodes every named and numeric entity
- Decimal or hex numeric entities
- Line breaks to
option - Live, private conversion
Why escaping HTML matters
If text that contains <script> or other tags is inserted into a web page without escaping, the browser runs it as code. This is the cause of cross-site scripting (XSS) attacks. Encoding <, >, & and quotes turns them into harmless text. Frameworks such as React, Vue and Astro do this automatically, but you need it when writing raw HTML, emails or documentation.
Modern pages use UTF-8, so accented letters and emoji normally need no encoding. The extra modes are for legacy systems, XML feeds and email templates that mangle non-ASCII characters.
Frequently asked questions
What is the difference between & and &?
Both represent the ampersand. & is the named entity and & the numeric (decimal) one; & is the hex form. Browsers treat them the same.
Which characters must be escaped in HTML?
In text, < and & are essential, and > is recommended. Inside attribute values, also escape the quote character that wraps the value.
How do I show HTML code on a web page?
Encode it here, then paste the result inside <pre><code> tags. The tags will appear as text instead of being rendered.
Is HTML encoding the same as URL encoding?
No. HTML entities protect text inside a page, while URL encoding (percent-encoding) makes text safe inside a web address. Use the URL encoder for links.