EzyTools

HTML Entities Encoder / Decoder

Convert & to & and back. Optionally escape every non-ASCII character.

Loading…

Runs entirely in your browser. Nothing you enter is uploaded or stored on a server.

About this tool

The characters <, > and & carry structural meaning in HTML, so showing them as text means converting them to entities — otherwise the page breaks or an injection door opens. This tool converts both ways and can escape non-Latin characters for older systems that accept only ASCII.

How to use

  1. 1Paste the text or HTML.
  2. 2Choose encode or decode.
  3. 3Turn on non-ASCII encoding if you need it.

When you need it

  • Showing a code snippet in a page without it being executed.
  • Passing Arabic text through a legacy system limited to ASCII.
  • Cleaning text copied from an editor that curls quotes automatically.

Frequently asked questions

Which characters need encoding?

In text: <, > and &. Inside an attribute value add " and '. Escaping those few prevents most structural breakage.

Does encoding protect against XSS?

Output encoding is a core part of the defence but not all of it. Context decides: text in a page differs from an attribute value, which differs from inside a script tag. Rely on your framework rather than hand-rolled escaping.

Should I encode Arabic letters?

Not while the page is UTF-8, which every modern site is. Encoding them only helps with legacy systems that require ASCII.

Related tools