HTML entity encoder and decoder is a browser-based tool for converting special characters like <, >, and & to their named HTML entities and back. Paste any text or markup and get the encoded output instantly.
Direct links for encode and decode.
&, <, >, ", ') with their named entities via sequential replace calls. Decoding sets the entity-bearing text as innerHTML on a detached textarea element and reads back the parsed .value.String.prototype.replace for encoding; DOM textarea for decoding so the browser's full HTML5 entity table (over 2,000 named entities) is used.Reviewed and tested May 25, 2026.