HTML Entity Encoder

The result will appear here.
0 entities encoded

What is HTML Entity Encoder?

HTML Entity Encoder converts special characters into HTML entities so they display safely in web pages. Angle brackets, ampersands and quotes become < & > and ", or use the numeric option for non-ASCII characters. Decode mode turns entities back into plain text. The tool runs entirely in your browser and is free with no signup.

How to use

  1. Paste your text or HTML snippet into the input box.
  2. Choose Encode to convert special characters to entities, or Decode to convert them back.
  3. In encode mode, optionally turn on numeric entities for non-ASCII characters.
  4. Click Copy result to copy the output.

Features

  • Encodes & < > " and the apostrophe to their named or numeric entities.
  • Optional numeric encoding for non-ASCII characters, such as accented letters and symbols.
  • Decode mode handles named, decimal and hexadecimal entities.
  • Live count of encoded entities in encode mode.
  • One-click copy and clear buttons.
  • Free, private, and no signup required.

Frequently asked questions

What is an HTML entity?

An HTML entity is a code that represents a character which has a special meaning in HTML, like &amp; for & or &lt; for <. Browsers display the character but do not treat it as code.

Why encode HTML entities instead of typing the character?

Characters like < and & can break your page or be interpreted as code. Encoding them makes sure they show as text, which is important when pasting code examples or user input into a page.

Should I use named or numeric entities?

Named entities like &amp; are easier to read. Numeric entities like &#38; are safer when the text passes through systems that might not understand entity names, including non-ASCII characters.

How do I decode HTML entities back to text?

Switch to the Decode mode and paste text containing entities. Named, decimal and hexadecimal entities are all converted back to their characters.

Is this tool free?

Yes, it is free with no signup and no limits.

Is my text sent to a server?

No. The conversion runs in your browser with JavaScript, so your text never leaves your device.

Related tools