Free Online HTML Entity Encoder & Decoder
Safely prepare text for embedding inside HTML by converting reserved characters into their entity equivalents, or reverse the process to read encoded content in plain language.
Ideal for developers, technical writers, and anyone pasting code snippets or user content into a web page.
Special characters in HTML can be read as markup, so text that contains angle brackets, ampersands or quotation marks needs escaping before it goes on a page. Bloggers do this when they want to show a code snippet rather than run it, and developers use it for text that goes into an attribute value or an email template. The decode direction is for the reverse problem: copied content that shows up as & or <p> instead of readable characters, as can happen with scraped pages, feeds or database exports.
Choose Encode Entities or Decode Entities with the two buttons at the top. Type or paste into the box labelled Input Text and read the answer in the Output box beside it, which updates as you go. A copy button sits above the output for moving it into your editor. Encoding replaces five characters: the ampersand, less-than, greater-than, double quote and single quote. The page loads with a sample line containing a div tag and a copyright entity, which makes the difference between the two modes easy to see.
Two details are worth knowing. Encoding does not touch accented letters, symbols or emoji; they stay as they are, which is fine on a page declared as UTF-8. Decoding hands your text to the browser's own HTML parser, so it understands the full set of named entities such as © and €, but it also treats any real tags in the input as markup and keeps only their text. If you decode something like <b>Hi</b>, the output is just Hi. For safety, encode user-supplied text rather than trying to filter it by hand.
Take the sample: <div class="header">Alona & Friends © 2026</div>. Encoded, it becomes <div class="header">Alona & Friends &copy; 2026</div>. Notice that the existing © was escaped too, because the encoder treats every ampersand as plain text, so it would display literally. Decoding <p>Tom & Jerry</p> gives <p>Tom & Jerry</p>, which is what a reader would expect to see. Encode only once, because running it twice produces &amp; and a visible mess on the page.
Key Highlights:
- Instant encode & decode modes
- Handles &, <, >, quotes, and apostrophes
- Copy-ready output
- Runs in your browser

