CARBIDEWEB
  • All tools
  • Blog

HTML Entity Encoder

WEB

Free online HTML entity encoder and decoder — escape special characters to named or numeric entities and convert them back to plain text.

Numeric (all non-ASCII)Also escape accented and non-ASCII characters as &#NNN;
OUTPUT
Output appears here

What is the HTML Entity Encoder tool?

This HTML entity encoder escapes text safely for HTML and XML, and decodes entities back to plain characters whenever you need the original — free, in your browser, with nothing uploaded. In encode mode it converts the five HTML-significant characters — &, <, >, double quote and apostrophe — into named entities like &amp; and &lt;, and an optional numeric toggle additionally turns every accented or non-ASCII character into a decimal &#NNN; reference, keeping your markup portable across any encoding. In decode mode it resolves named, decimal and hexadecimal (&#xNN;) entities back into real characters, passing unknown entities through untouched so nothing is corrupted.

It is the quick fix for a familiar problem: you paste code or text containing < or & into a CMS, a comment field or an email template, and the page breaks or swallows half your content. Escape the text here first and it displays literally, exactly as written. Going the other way, decoding cleans up escaped output you copied from source code, logs or an API response. It pairs naturally with Carbide's URL encoder, which solves the same problem for links instead of markup.

Everything runs on your device: your text is never sent to a server, the tool works offline once loaded, and there is no account, watermark or limit. Conversion is instant as you type, and the result copies with one tap — on desktop or on your phone.

How to use the HTML Entity Encoder

  1. Choose Encode to escape text, or Decode to convert entities back.
  2. Type or paste your text into the input box.
  3. In encode mode, turn on numeric encoding if you also want accented and non-ASCII characters escaped.
  4. Watch the converted result appear instantly in the output panel.
  5. Copy the result or share it directly — switch modes any time to round-trip the same text.

Frequently asked questions

When do I need to escape HTML?

Whenever text that could contain <, > or & is placed inside a web page and should display literally: code samples in a blog post or CMS, user-generated content, and text in email templates or XML payloads. Unescaped, the browser interprets those characters as markup — which breaks layouts and enables injection bugs.

&amp; vs &#38; — what's the difference between named and numeric entities?

They render identically — both display an ampersand. &amp; is a named entity, readable to humans; &#38; is a numeric (decimal) reference to the same character, and &#x26; is its hexadecimal form. Named entities exist only for a fixed list of characters, while numeric references can express any Unicode character, which is why the numeric option here can escape everything beyond ASCII.

What are HTML entities?

Entities are the escape syntax HTML uses to represent characters that would otherwise be parsed as markup or are hard to type: they start with & and end with ; — like &lt; for <, &copy; for the copyright sign, or &#233; for é.

Does it decode named, decimal and hex entities?

Yes. The decoder resolves named entities (such as &copy; and &mdash;), decimal references (&#233;) and hexadecimal references (&#xe9;). Unrecognised or malformed entities are passed through unchanged, so your text is never corrupted.

Is my text uploaded anywhere?

No. All encoding and decoding happens entirely in your browser on your device — nothing you type is sent to a server, and the tool works offline once loaded.

Is the HTML entity encoder free?

Yes, completely free — no account, no sign-up and no limits on how much text you encode or decode.

From the blog

Take Carbide everywhere
All 176 tools, offline, on iOS & Android — free.