Encode or decode HTML entities.
Need to safely embed user-generated content or template literals in a web page? This free HTML encode / decode tool instantly converts special characters like &, <, >, ", and ' into their HTML entities—and decodes them back—right in your browser. No data is sent to any server. Paste your text, click Encode or Decode, and copy the result in one click.
HTML encoding replaces characters that have special meaning in HTML—such as &, <, >, ", and '—with safe escape sequences called HTML entities (e.g. & becomes &, < becomes <). This prevents browsers from misinterpreting your content as markup and is essential for security when displaying user-supplied text.
You should decode HTML entities when you receive data from an API, database, or feed that has already been encoded and you need the plain text version—for example before processing it in JavaScript or displaying it inside a non-HTML context like a plain-text email or a PDF.
The ampersand (&) is the opening character of every HTML entity, so it must be encoded first. If you encoded other characters first, the & characters introduced by those encodings would themselves be re-encoded, producing double-encoded output like &lt; instead of <.
No. All encoding and decoding happens entirely inside your browser using JavaScript. Nothing you type is transmitted over the network, making it safe to use with sensitive or proprietary content.