Free HTML Entity Encoder & DecoderEncode special characters to HTML entities or decode them back—fast, free, and private.

Characters: 52

Characters: 0

Encoding and decoding run entirely in your browser. No content is uploaded.

What is an HTML entity encoder?

An HTML entity encoder converts characters like <, >, &, and quotes into their entity forms (&lt;, &gt;, &amp;, &quot;) so they display as text instead of being parsed as HTML markup.

Decoding reverses the process—turning entities back into readable characters for editing or debugging.

When developers need entity encoding

Use encoding when pasting sample HTML into docs, preparing safe display text, or checking how escaped content looks in templates. Decode when you receive entity-encoded strings from APIs or CMS fields and need the original text.

Toggle Encode/Decode mode, convert, and copy the result—no scripts or build steps required.

How to use this encoder

  1. Choose Encode or Decode mode.
  2. Paste your text into the input panel.
  3. Click Encode or Decode to generate output.
  4. Copy the result, or use output as input to reverse the conversion.

Privacy-first by default

Encoding and decoding run only in your browser. Your content is never uploaded, logged, or stored on a server.

Frequently Asked Questions

What are HTML entities?

HTML entities are escaped representations of characters that have special meaning in HTML, such as &lt; for <, &gt; for >, &amp; for &, and &quot; for ".

When should I encode HTML entities?

Encode entities when inserting untrusted or special-character text into HTML so browsers display the characters instead of interpreting them as markup.

Is encoding the same as escaping for XSS?

HTML entity encoding is one important part of XSS prevention for HTML text contexts, but secure apps also need context-aware escaping, CSP, and validated frameworks—encoding alone is not a complete security strategy.

Related Tools

All tools