HTML Entity Encoder / Decoder

Escape HTML safely, or decode entities back.

HTML Entity Encoder escapes characters that have meaning in HTML — angle brackets, ampersands, quotes — into entities, and decodes named and numeric entities back into characters. It offers minimal escaping for safe output and full escaping for legacy systems that require ASCII. Text is converted in your browser and never uploaded.

Loading HTML Entity Encoder / Decoder…

Runs entirely on your device. No file or text you enter here is uploaded. How to verify it.

How to use HTML Entity Encoder / Decoder

  1. Paste text or HTML.
  2. Choose minimal or full escaping.
  3. Copy the encoded or decoded result.

Questions about HTML Entity Encoder / Decoder

Which characters actually need escaping?
In element content, < and &. In an attribute value, add the quote character you are using. Escaping more than that is harmless but noisy — and escaping less is how cross-site scripting happens.
Named or numeric entities?
Named entities like &copy; are readable; numeric ones like &#169; work in XML and older parsers that only know the five predefined names. Both are offered.
Does escaping make user input safe?
It makes it safe as text content. It does not make it safe inside a script block, a style block, a URL attribute or an event handler — each of those needs its own context-specific encoding.
Will it decode entities I did not encode here?
Yes. Decoding accepts the full named entity set plus decimal and hexadecimal numeric references, so text lifted out of an HTML source or an XML feed converts back to plain characters.
Should I use this to sanitise user input for my site?
No. Escaping by hand in a browser, after the fact, is not a security control. Escape on output in your template engine, in the context the value lands in. This tool is for inspecting and repairing text, not for building a defence.
Is HTML Entity Encoder / Decoder really free, with no limits?
Yes. There is no account, no daily cap, no file-size tier and no watermark, because there is no server cost to recover. The site is funded by clearly disclosed partner recommendations on the Partners page, never by metering the tools.
Are my files or text uploaded when I use HTML Entity Encoder / Decoder?
No. Everything is processed by JavaScript running in your browser, on your device. You can verify it: open your browser's developer tools, switch to the Network tab, and use the tool. You will see no request carrying your data — because there is nowhere for it to go.