Loona Automation logoLoona Developer Tools
Home › Developer Tools › HTML Entity Encoder

HTML Entity Encoder & Decoder - Named or Numbered

In short: the HTML Entity Encoder escapes text so browsers display it instead of interpreting it as code - in named style where a name exists, or fully numbered style - and decodes entities from other people's markup back into readable text.

Writing a tutorial that shows actual tags? Publishing user comments safely? The moment text containing <, > or & goes into a web page unescaped, the browser treats it as markup. Encoding it into entities makes it display exactly as written - and this tool also decodes, for when you inherit markup full of &copy; and &#8212;.

Private by design: everything in this tool happens 100% in your browser with JavaScript. Your input is never uploaded to a server, never stored and never seen by us - close the tab and everything is gone.

How to use the HTML Entity Encoder

  1. Paste or type your text.
  2. Choose Named style for readable entities or Numbered style for maximum compatibility.
  3. Click Encode - or Decode to turn entities back into text.

How it works

An HTML entity is a code the browser swaps for a character when rendering: &lt; displays as <, &amp; as &, &copy; as ©. Every character also has a numeric form based on its Unicode code point - © is ©. Named mode uses the friendly name where one exists in this tool's table and falls back to numbered form for the five markup-critical characters; Numbered mode encodes every special and non-ASCII character numerically, which some older systems handle more reliably. Decoding uses the browser's own HTML parser, so every named and numbered entity the platform knows is understood.

Worked example

The sentence "Tom & Jerry <3 © 2026" typed as Tom & Jerry <3 © 2026 encodes in Named style to Tom &amp; Jerry &lt;3 &copy; 2026 - paste that into a web page and visitors see exactly the sentence you typed, heart included.

Frequently Asked Questions

Is this HTML entity encoder free?

Yes - free, with no sign-up and no limits.

Named or numbered - which should I choose?

Named entities are easier for humans to read in source code. Numbered entities work everywhere, including very old systems and XML contexts where some names are undefined. Both display identically.

Why must &amp; and &lt; always be encoded?

Because they are the two characters HTML itself is built from: & starts an entity and < starts a tag. Left raw, they corrupt the page structure.

Can it decode any entity?

Decoding runs through the browser's own parser, so it understands the full standard set of named entities as well as decimal and hexadecimal numeric forms.

Is my text uploaded?

No - encoding and decoding happen entirely in your browser.

Related Developer Tools

Embed this tool on your website — free

Add this tool to your own website or blog — it is completely free, needs no sign-up, and always shows the latest version. Copy the code below and paste it into your page where you want the tool to appear. Keeping the small “Powered by Loona Automation” credit line under the embed helps keep this tool free — but you are free to style or remove it; the tool works either way.