HTML Entity Encoder

Show example HTML tags as readable text inside an HTML document.

Text inputPreview and copyRuns in your browser

Enter your text

Result

How to use HTML Entity Encoder

  1. Paste your source text in the input box.
  2. Select Convert to generate the output.
  3. Review the output before copying it.

How it works

Show example HTML tags as readable text inside an HTML document. Replace ampersands, angle brackets, and quotation marks with HTML character references.

Formula or processing rules

Replace ampersands, angle brackets, and quotation marks with HTML character references.

Worked example

The markup-like text <b>Tea & coffee</b> becomes character references where syntax characters occur.

Example text lengths in UTF-16 code units
Input · 19
Output · 35
Worked example
MeasureValue
Source text<b>Tea & coffee</b>
Result&lt;b&gt;Tea &amp; coffee&lt;/b&gt;

Pros and cons

Pros

Show example HTML tags as readable text inside an HTML document. The sample provides an immediate check of the expected output.

Cons

Escaping depends on context. This output is for text examples and does not constitute a general HTML sanitizer.

Troubleshooting

Check the input format and compare your case with the built-in sample. Escaping depends on context. This output is for text examples and does not constitute a general HTML sanitizer.

Frequently asked questions

How do I use the text I get back?

Copy the output into the document, list, or compatible tool where you need it.

How does the transformation work?

Replace ampersands, angle brackets, and quotation marks with HTML character references.

Can I try a sample first?

The markup-like text <b>Tea & coffee</b> becomes character references where syntax characters occur.

What should I check before using the result?

Escaping depends on context. This output is for text examples and does not constitute a general HTML sanitizer.

Is my input stored by the tool?

The transformation is computed in the open page. The tool does not save the submitted text.