Encode text into safe HTML entities — or decode entities back to plain text — with named and numeric entities.
output length
How to use this tool
Paste HTML, code or plain text with special characters.
Encode turns characters into entities; decode turns entities back into characters.
Paste the encoded text safely into HTML, docs or code samples.
Use numeric-only encoding when a system does not recognise named entities.
Formula & worked example
<div> encodes to <div>, and © decodes from ©, © or © alike.
Limitations — read this before you rely on it
Surrogate-pair characters outside the basic multilingual plane (some emoji) are encoded per UTF-16 code unit, which browsers still render correctly when decoded as a pair. Unknown entities are left unchanged on decode rather than guessed.
Frequently asked questions
So code samples display as text instead of running as markup — essential for docs, blogs and forums.
Named entities are readable (©); numeric entities work everywhere, even where a named entity is unknown.
No — the result is shown as plain text, never inserted as live HTML.
Emoji become numeric entities and decode back correctly in browsers.
No. Encoding and decoding run entirely in your browser.
