Encode or decode HTML entities

For authors publishing reserved characters or developers reading encoded markup, HTML Entities moves safely between code and visible text.

Convert reserved characters to HTML entities or decode them back into readable text when needed. You get the result directly in your browser.

How to use

  1. Paste the HTML fragment or text containing reserved characters into the input area.
  2. Choose encoding to turn characters into entities, or decoding to restore readable text.
  3. Enable the option that encodes every character if needed, then run the operation to display the result.
  4. Review the output, copy it into your editor, and check that reserved characters no longer break your code.

Example

With the sample fragment, encoding should turn angle brackets and the ampersand into HTML entities. Decoding should then restore the original text, which lets you check that the round trip stays consistent.

Input

<p>Hello & welcome</p>

Output

&lt;p&gt;Hello &amp; welcome&lt;/p&gt;

Limits and formats

Where processing happens

Encoding and decoding take place in your browser. The content you enter stays on your device and is not sent to any outside service.

Frequently asked questions

Why encode characters as HTML entities?

Some characters, such as angle brackets and the ampersand, have special meaning in HTML. Replacing them with entities prevents them from being read as markup when you want to display them.

When should I decode entities?

Decoding is useful for reading an encoded content block, fixing imported text or restoring the readable form of a fragment before editing it.

Do I need to encode every character?

Not always. Encoding only reserved characters is often enough and keeps the code easier to read. The full option can be useful for a specific test.

Will encoding entities make my page secure?

No. Encoding entities is not enough to secure a page and does not replace careful validation of displayed content. Use it to turn reserved characters into entities so they display as text. Review the output before copying it into your editor. The operation happens in your browser and the content stays on your device.

What should I check after decoding entities?

Decoding can bring reserved characters back, so check the context before reusing the result. It is useful for reading encoded content, fixing imported text or restoring the readable form of a fragment before editing it. Review the output in your editor and confirm those characters are safe in their new location. Encoding and decoding take place in your browser.

Tools in the same category