DevTools Logo

HTML Encoder/Decoder

HTML Encoder/Decoder

Convert special characters to HTML entities and back

Encode HTML

Convert special characters to HTML entities for safe display

HTML Entities Reference

&→&
<→&lt;
>→&gt;
"→&quot;
'→&apos;
¡→&iexcl;
¢→&cent;
£→&pound;
¤→&curren;
¥→&yen;
¦→&brvbar;
§→&sect;
¨→&uml;
©→&copy;
ª→&ordf;
«→&laquo;
¬→&not;
®→&reg;
¯→&macr;
°→&deg;
±→&plusmn;
²→&sup2;
³→&sup3;
´→&acute;
µ→&micro;
→&para;
·→&middot;
¸→&cedil;
¹→&sup1;
º→&ordm;
»→&raquo;
¼→&frac14;

Examples

Click an example to load it

HTML Tags
<div class="container">Hello & welcome!</div>...
<div class="container">Hello & welcome!</div>
JavaScript
const name = "John"; // Comment with "quotes"...
const name = "John"; // Comment with "quotes"
XSS Prevention
<script>alert("XSS")</script>...
<script>alert("XSS")</script>
Special Chars
Copyright © 2024 | Price: €50 | "Quoted" & 'single...
Copyright © 2024 | Price: €50 | "Quoted" & 'single'
URL Attributes
<a href="page.html?a=1&b=2">Click & go</a>...
<a href="page.html?a=1&b=2">Click & go</a>

About this tool

Encode and decode HTML entities. Convert special characters to HTML entities and back. Perfect for displaying code safely in HTML. HTML Encoder/Decoder runs in the browser on DevTools. There is no signup, and your input stays on this device unless the tool explicitly performs a live network lookup.

What this tool does not do

  • HTML Encoder/Decoder is a free in-browser utility, not a hosted API. It does not keep server-side history and is not a substitute for production verification in your own stack.

How do I use this tool?

  1. How do I use HTML Encoder/Decoder?

    Open HTML Encoder/Decoder, enter or paste your input, and copy the result. The page works without an account.