HTML Entity Encoder and Decoder

Escape < > & and quotes as HTML entities, or turn entities like &amp; back into characters. Runs in your browser.

About HTML Entity Encoder and Decoder

Replace the characters that have meaning in HTML (<, >, &, quotes) with entities such as &lt; and &amp;, so text displays literally inside a web page. Decode turns entities like &copy; or &eacute; back into normal characters. Use it to show code samples in a blog, clean scraped HTML, or check how a value will render.

Decoding uses the browser's own HTML parser, so named and numeric entities are handled the same way a browser would show them.

How to use it

  1. Choose Encode to escape text or Decode to restore it.
  2. Paste the text into the input box.
  3. Copy the output.

Questions

Is my text uploaded?

No. Everything runs in your browser; nothing you type or generate is sent to a server.

Do I need to encode everything?

Only < > & and quotes need escaping inside HTML. Encoding every character is valid but makes the markup hard to read.

Is decoding safe for untrusted HTML?

Decoding runs the text through an inert HTML parser and returns plain text, so scripts in the input are not executed.

More Data & Converters tools

Home · All Tools · Blog