HTML Entity Converter
Encode text to HTML entities or decode entities back to plain text.
How this tool works
Choose Encode or Decode
Pick the direction with the mode toggle.
Paste your text
Raw text with special characters, or a string containing HTML entities.
Conversion happens live
Encoding maps special characters to named entities; decoding uses the browser’s own HTML parser.
Copy the result
Grab the encoded or decoded text, ready to use.
Quick facts
- Category
- Encoders & Decoders
- Best for
- Safely embedding user text inside HTML markup
About this tool
Switch between encoding and decoding HTML entities with a single click. Encoding converts the characters that have special meaning in HTML - <, >, &, ", and ' - into their named entity equivalents (<, >, &, ", ') so text can be safely embedded inside HTML markup without being misinterpreted as a tag or attribute boundary, and converts non-ASCII characters like accented letters or symbols into named entities where a common one exists (like é for é) or a numeric entity otherwise. Decoding reverses the process using the browser’s own HTML parser rather than a hand-maintained lookup table, so it correctly handles the full range of named and numeric entities a browser would recognize, not just the handful this tool encodes to. Useful for safely embedding user-generated text in HTML, debugging why entities are showing up literally on a page, or converting scraped HTML content back to readable text. Runs entirely client-side.
Why use this tool
Browser-native decoding
Decoding uses the browser’s own HTML parser, so it correctly handles every named and numeric entity.
Covers the characters that matter
Encodes the reserved characters that actually break HTML rendering if left unescaped.
Handles non-ASCII text
Accented letters and symbols convert to named entities where one exists, numeric otherwise.
Both directions, one toggle
Switch between encode and decode without needing two separate tools.
Frequently asked questions
HTML uses "<" to start a tag and "&" to start an entity reference, so if either character appears literally inside text meant to be displayed as content, a browser can misinterpret it as markup instead of plain text - a stray "<" might get treated as the start of a broken tag. Encoding them as < and & tells the browser to render the literal character instead of trying to parse it as HTML syntax.
HTML defines well over 200 named entities plus the full range of numeric character references, and the browser’s built-in HTML parser already implements that complete, spec-correct mapping. Reusing it for decoding guarantees correctness for any valid entity - not just the common ones a hand-written table happens to include - without duplicating that large mapping in this tool’s code.
Explore more free tools
Formatters, converters, validators, and generators - all free and running entirely in your browser.
Browse more tools