HTML Encode / Decode
Escape text into HTML entities or decode entities back to plain characters.
Why encode HTML?
Certain characters are meaningful to a browser: < starts a tag, &
starts an entity. If you want to display those characters as text β in a code sample or a
comment field β you must replace them with entities such as < and
&. Correct encoding is also a core defence against cross-site scripting.
What this tool converts
Encoding escapes the five significant characters & < > " '. Decoding reverses
named entities and numeric ones β both decimal like © and hex like
© β using an explicit lookup, so nothing from your input is ever inserted into
the live page.
How to use the HTML Encode / Decode
- Choose a mode. Pick Encode to create entities, or Decode to expand them.
- Enter your input. Paste the text or the entity-laden markup.
- Click Convert. The output also refreshes live as you type.
- Copy the result. Use the Copy button to reuse the output.
Frequently asked questions
Which characters get encoded?
The five that matter for safe HTML: & becomes &, < becomes <, > becomes >, " becomes " and ' becomes '.
Does decoding run my HTML?
No. Decoding uses an explicit character map and numeric parsing, never innerHTML, so no markup or script is ever executed.
Does it handle numeric entities?
Yes. Both decimal (©) and hexadecimal (©) numeric references are decoded to their characters.
Is my text uploaded?
No. Encoding and decoding happen locally in your browser.