HTML Entity Encode / Decode
Encode text into HTML entities or decode entities back to plain text. Output updates as you type, and everything runs in your browser.
About the HTML Entity Encode / Decode
The HTML Entity Encode / Decode tool converts characters that have special meaning in HTML into entities, and converts entities back into plain text. Encoding turns <, >, &, quotes, and other characters into safe entity codes so they display as literal text instead of being parsed as markup. Decoding reverses that, resolving named entities (like &) and numeric entities (like & or &) into the original characters. It is useful for WordPress and Divi users pasting code into posts, developers escaping values for templates, and anyone cleaning up content copied from another source. Everything runs in your browser, so your text is never uploaded.
How it works
- Pick a mode: Encode to turn text into entities, or Decode to turn entities back into text.
- Type or paste your content into the input area. The output updates as you type.
- When encoding, choose the entity format (named, decimal, or hex) and optionally encode all non-ASCII characters.
- Click Copy to put the result on your clipboard, or Clear to start over.
Features
- Two modes in one tool: encode plain text to entities, or decode entities back to text.
- Three encode formats: named (&amp;), decimal (&#38;), and hexadecimal (&#x26;).
- Option to encode all non-ASCII characters, useful for symbols and accented letters.
- Decoding handles both named entities and numeric entities (decimal and hex).
- Live output, one-click copy, and a load-sample button to see the behavior right away.
Frequently asked questions
Which characters does encoding convert?
By default it converts the characters that affect HTML parsing: <, >, &, double quote, and single quote, plus common symbols such as ©, ™, and the em dash. Turn on 'Encode all non-ASCII' to also convert accented letters and other characters above the ASCII range.
What is the difference between named, decimal, and hex entities?
They are three ways to write the same character. Named entities use words (&amp; for &). Decimal entities use the character's code number (&#38;). Hex entities use the same number in hexadecimal (&#x26;). Browsers treat all three the same; named entities are often easier to read.
Does decode handle numeric entities?
Yes. Decoding resolves named entities (like &copy;) as well as decimal (&#169;) and hexadecimal (&#xA9;) numeric entities back to their original characters.
Is my text sent to a server?
No. Both encoding and decoding happen in your browser. Nothing you type or paste leaves your device, and nothing is logged.
Why would I encode quotes?
Quotes can break HTML attributes if they are not escaped. For example, a double quote inside an attribute value can end the attribute early. Encoding quotes to entities keeps the value intact when you place text inside attributes.