HTML Encode / Decode

Encode special characters as HTML entities or decode entities back into readable text.

HTML Encode / Decode

Convert HTML special characters to safe entities or decode entities back into readable content.

Enter HTML or entity-encoded text to get started.

1

Encode

Plain text → HTML entities

0 characters
Encoded Output
Encoded output will appear here.
2

Decode

HTML entities → plain text

0 characters
Decoded Output
Decoded output will appear here.

Common HTML Entities

CharacterNameEntityDescription
<Less than&lt;Less-than sign
>Greater than&gt;Greater-than sign
&Ampersand&amp;Ampersand
"Double quote&quot;Quotation mark
'Single quote&#39;Apostrophe
CharacterNameEntityDescription
/Forward slash&#x2F;Solidus
©Copyright&copy;Copyright symbol
®Registered&reg;Registered mark
Trademark&trade;Trademark symbol
Non-breaking space&nbsp;Non-breaking space
100% Free

Use every feature without limits.

Instant Results

Encode and decode immediately.

Privacy Focused

Everything stays in your browser.

Copy & Download

Copy results for immediate use.

Works Everywhere

Compatible with modern devices.

Practical guide

Using HTML Encode / Decode with confidence

Reviewed by LipiCode Editorial Team

What this tool helps you do

HTML entity encoding represents characters such as angle brackets and ampersands so they can be displayed as text rather than interpreted as markup. Context-aware output escaping is a key defence, but entity conversion alone is not a complete HTML sanitizer.

When it is useful

  • Displaying markup examples
  • Inspecting HTML entities
  • Escaping plain text for an HTML text node
  • Debugging encoded content

A practical example

To show a literal less-than sign in page text, encode it as &amp;lt;. A trusted template engine should normally perform the correct escaping automatically for the output context.

Limitations and common mistakes

HTML text, attributes, URLs, CSS, and JavaScript require different safety rules. Do not decode untrusted input and inject it with innerHTML. Use a maintained sanitizer when limited markup must be accepted.

Frequently asked questions

Is HTML encoding the same as sanitizing?

No. Encoding displays text safely in a specific context; sanitizing selectively permits reviewed markup.

Why is ampersand encoded first?

It begins entity syntax, so handling it consistently prevents accidental or repeated entity interpretation.

Read the related in-depth guide