Skip to content

HTML Entities Encoder/Decoder

Encode HTML special characters or decode HTML entities back to plain text.

Input
Output

69 characters, 7 entities

HTML Entities Encoder and Decoder

Encode special characters such as ampersands, angle brackets, quotes, and non-ASCII characters into HTML entities, or decode entities back into readable text.

Supported entity formats

  • Named entities such as &, <, >, and ©
  • Decimal numeric entities such as ©
  • Hex numeric entities such as ©

How to use HTML Entities Encoder/Decoder

The HTML entities tool encodes and decodes special characters such as angle brackets, ampersands, quotes, and symbols. It helps when text needs to be shown safely in HTML.

Developers often use this page when they need html entity encoder, html entities decoder, html entity decoder, and encode html entities.

Privacy and data handling

This tool is designed to run in your browser for normal use, so your input does not need to be sent to a server.

  • Input and output stay on the page while you work.
  • Copy buttons use your browser clipboard permission when available.
  • Avoid pasting private production data on shared or untrusted devices.

Examples

Encode HTML code as text

Input

<div>Hello & goodbye</div>

Output

&lt;div&gt;Hello &amp; goodbye&lt;/div&gt;

Encoding lets a browser show the code instead of treating it as real markup.

Decode an entity

Input

Tom &amp; Jerry &copy; 2026

Output

Tom & Jerry (c) 2026

Decoding turns named or numeric entities back into readable characters.

Steps

  1. 1Paste text or encoded entities.
  2. 2Choose encode or decode.
  3. 3Copy the result into HTML, docs, or tests.

Common use cases

  • Show code examples on a web page.
  • Decode copied HTML entity text.
  • Escape special characters in small snippets.

Practical tips

  • Encoding helps display characters, but it is not full security sanitization.
  • Use proper escaping from your framework for real user content.
  • Decode only when you trust where the text came from.

FAQ

What is an HTML entity?

An HTML entity is a text code that represents a character, such as &amp; for an ampersand or &lt; for a less-than sign.

Is entity encoding enough to stop XSS?

Not by itself. It is one part of output escaping, but real XSS protection depends on context and framework-safe rendering.

Related Developer Tools