Orlixio

Free browser tool

HTML Entity Encoder and Decoder

This HTML entity encoder and decoder converts characters such as angle brackets, ampersands, quotes, and apostrophes into HTML-safe entities. It also decodes common entities back into readable text for inspection or cleanup.

HTML entities are useful when displaying code examples, escaping text that should not become markup, or debugging copied content from pages and templates.

HTML entity encoder/decoder

Encode special HTML characters or decode HTML entities.

What this tool does

HTML entities represent special characters as safe text. For example, < becomes &lt; and & becomes &amp;. This matters when you want to display code, snippets, or user-provided text without letting it become active markup.

This encoder focuses on common escaping for examples and templates. It is useful for docs, blog posts, support replies, and quick cleanup of copied HTML entity text. It is not a complete HTML sanitizer for untrusted markup.

Common use cases

Display code in HTML

Encode angle brackets so code examples render as text instead of elements.

Decode copied content

Turn entity-heavy text back into readable characters.

Prepare safe examples

Escape text snippets before placing them in static HTML examples.

Example before and after

The encoded output can be displayed inside HTML without being parsed as a real button element.

Original text

<button aria-label="Save">Save</button>

Entity-encoded text

&lt;button aria-label=&quot;Save&quot;&gt;Save&lt;/button&gt;

How to use

  1. Paste text with HTML characters or entities.
  2. Click Encode Entities or Decode Entities.
  3. Copy the escaped or decoded result.

Common errors

Using encoding as sanitization

Escaping text helps display it safely, but sanitizing arbitrary HTML is a separate security task.

Encoding twice

Double-encoded text can show visible entities such as &amp;lt; instead of <.

Forgetting ampersands

Ampersands should be encoded first so new entity-looking text is not created accidentally.

Why use this tool

Escape code examples for HTML pages.

Decode copied HTML entity text.

Avoid accidental markup in examples and snippets.

Best practices

Escape examples intentionally

Encode snippets that should be shown as text, not executed as markup.

Decode before editing

Decode entity-heavy content before making human edits.

Use real sanitizers for HTML

For untrusted HTML, use a trusted sanitizer in your application stack.

Related tools

Related guides

FAQ

What characters are encoded?

The tool encodes ampersands, angle brackets, double quotes, and apostrophes.

Does this sanitize HTML?

No. It is an encoder/decoder, not a security sanitizer for untrusted HTML.

Can it decode named entities?

Yes. The browser's HTML parser decodes common named and numeric entities.

Is text processed locally?

The tool runs in your browser and does not require login, a database, or server-side processing.