Neatbo.

HTML entity encoder and decoder

Encode special HTML characters, or decode named and numeric references as plain text.

Browser-local processingInputText or HTML character referencesOutputHTML character references or decoded text
  1. 1Add input
  2. 2Adjust settings
  3. 3Get your result

Tool input and files are processed in this browser without being uploaded.

Your input
0 characters · 0 bytes
Options

Complete the required options first. You can keep the defaults for the rest.

For encoding only. Also writes non-ASCII characters as hexadecimal numeric references. The five special HTML characters are always escaped.

Inputs are kept temporarily in this tab when switching tools. Refreshing or closing clears them; large results may need to be regenerated.⌘ / Ctrl + Enter to run

Preparing the tool…

Before you start

Encode &, <, > and quotation marks as HTML character references, or turn supported named and numeric references back into readable characters. Conversion happens in your browser, and the result is displayed as plain text.

How to use this tool

  1. Paste the text or HTML character references into Text. Under Options, choose Encode or Decode in Operation.
  2. When encoding, enable Encode non-ASCII characters too if you also want characters such as accented letters or emoji written as numeric references. This option is hidden when decoding.
  3. Select Convert HTML entities and review the text. Use Copy result for the complete output or download result.txt. Convert again after changing the input or options.

Supported inputs and limits

Paste up to 1 MiB of text, measured in UTF-8 bytes. This tool has no file input.

Decoding requires a closing semicolon. Unknown names and references without a semicolon stay unchanged. Recognized numeric references with a value of zero, a surrogate code point or a value above U+10FFFF cause an error.

Some numeric references use HTML's legacy C1 mapping: &#128; decodes to €. Their results can differ from treating the number as a Unicode code point directly.

Encoding does not preserve existing references: their ampersands are escaped again. Choose Decode when you want references converted back into characters.

Worked example

Example input

<a>&"
Example options
{}

Example output

&lt;a&gt;&amp;&quot;

When something does not work

If a reference stays unchanged, check its name, letter case and closing semicolon. Correct invalid numeric values in the original text before trying again. Review nested references before decoding a result a second time. Editing the input marks the previous result as stale, and a failed run clears it. Copy or download any result you need before refreshing or closing the tab.

Frequently asked questions

Why do some references stay unchanged?

The decoder looks for supported, semicolon-terminated names and decimal or hexadecimal numeric references. Named references are case-sensitive. It leaves unknown names and text outside those forms as written. It also decodes only once: &amp;lt; becomes &lt;, rather than a less-than sign.

Can decoded HTML run in the result?

No. The result is displayed as plain text, even when it contains tags or scripts, and the download is a text file. This conversion does not validate HTML or sanitize it for insertion into a page; check how the destination will interpret the text.

Documentation & further reading

Related tools