HTML Entity Converter
Encode special characters into HTML entities, or decode entities back into plain text.
How it works
Encoding replaces the five characters that have special meaning in HTML — & < > " ' — with their named entities (& < > " '), so the text can be embedded safely inside HTML without being interpreted as markup. Decoding uses the browser's own HTML parser to turn any named or numeric entity back into the character it represents, the same way a browser reads a web page.
Example
Encoding <a href="x"> produces <a href="x"> — safe to drop into an HTML template. Decoding <b>&amp;</b> reveals the original <b>&</b>, including an entity nested inside other entities.
Frequently asked questions
Why do I need to encode these characters?
Because <, > and & have special meaning in HTML — an un-encoded < can start a tag, breaking your page or enabling injection. Encoding makes the text safe to embed literally.
Does decoding handle numeric entities too?
Yes — both named entities like & and numeric ones like ' or ' are decoded correctly, since decoding uses the browser's real HTML parser.
Is this the same as URL encoding?
No — HTML entities protect text embedded in HTML markup; URL encoding (percent-encoding) protects text embedded in a URL. Use the right one for where the text is going.
Is my text uploaded anywhere?
No — both encoding and decoding run entirely in your browser.
Related tools
Percent-encode text for safe use in URLs, or decode %-sequences back into readable text.
JSON Formatter & ValidatorFormat, validate and minify JSON online with clear error messages pointing at the failing line.
XML FormatterPretty-print and validate XML with clean indentation — configs, SOAP payloads, sitemaps, RSS.