HTML Entity Encoder

Encode text into safe HTML entities — or decode entities back to plain text — with named and numeric entities.

100% FreeNo sign-upPrivate — runs in your browser
—

output length

Input length
—
Output length
—

        
Copied to clipboard

How to use this tool

1
Paste your text

Paste HTML, code or plain text with special characters.

2
Choose encode or decode

Encode turns characters into entities; decode turns entities back into characters.

3
Copy the result

Paste the encoded text safely into HTML, docs or code samples.

4
Numeric mode

Use numeric-only encoding when a system does not recognise named entities.

Formula & worked example

Encoding replaces & < > " with & < > ", common symbols with named entities (© etc.), and any other non-ASCII character with its numeric code (é). Decoding reverses all three forms.

<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.