Developer

HTML Encode & Decode

Convert special characters to safe HTML entities and back. Encode &, <, >, " and ' or optionally every non-ASCII character to numeric references, and decode named, decimal and hex entities — all locally in your browser.

Examples

Input · Special characters become safe entities.
Tom & Jerry <b>
Output
Tom &amp; Jerry &lt;b&gt;

How it works

Encode replaces the five characters that have a special meaning in HTML with entities, so a browser shows them as text instead of reading them as markup. Decode does the reverse.

The five characters Encode always escapes
CharacterBecomesWhy
&&amp;Starts an entity
<&lt;Opens a tag
>&gt;Closes a tag
"&quot;Ends a double-quoted attribute
'&#39;Ends a single-quoted attribute

With “encode all non-ASCII” switched on, every character above code point 127 also becomes a decimal reference, so © turns into &#169;. Decode understands decimal and hex references for any character, plus the most common named entities such as &nbsp;, &copy;, &mdash; and &euro;. A named entity it does not recognise is left as it is.

How to use HTML Entity Encode/Decode

Enter your text
Paste the text or HTML you want to convert into the input box.
Pick a direction
Switch between Encode and Decode, and toggle 'encode all non-ASCII' if needed.
Grab the output
Use Copy or Download to save the converted result.

Why use this tool

Escapes the five core HTML characters safely
Optionally encodes every non-ASCII character to numeric entities
Decodes named, decimal and hex references
Runs entirely in your browser — nothing is uploaded

Frequently asked questions

Yes. Decoding handles common named entities plus any decimal or hex numeric reference.

It converts every character above code point 127 into a numeric entity, which is useful for strict ASCII-only contexts.

HTML encoding turns characters like < and & into entities so they display as text on a web page. URL encoding turns characters into %XX codes so they are safe inside a link. Use the URL Encode/Decode tool for links.

Found a bug or have an idea?

ToolOrbit is actively developed — feedback directly shapes what gets built next.

Send feedback