Convert special characters to their HTML entity equivalents. Paste any text and get a safe HTML-encoded version where characters like <, >, &, and " are replaced with <, >, &, and ".
Encoding uses a lookup map to replace characters like <, >, and &with their named HTML entities. Decoding uses the browser's built-in DOMParser to reverse the process. Both run entirely in your browser. No server required.
All encoding and decoding happens locally in your browser tab. Our servers are not involved at any point.
For percent-encoding URL components, try URL encode. To encode binary blobs or images as text, use Base64. For previewing escaped markup, see the Markdown preview.
HTML encoding converts characters that have special meaning in HTML, like < (less-than) and & (ampersand), converted to their entity equivalents (< and &). This prevents them from being interpreted as HTML markup.
When displaying user-supplied text in HTML, failing to encode it can allow HTML injection or cross-site scripting (XSS) attacks. Encoding ensures the text is displayed literally rather than interpreted as markup.
At minimum: & becomes &, < becomes <, > becomes >, " becomes ", and ' becomes '. This tool encodes all five.
All processing runs in your browser with JavaScript. Our servers are not involved at any point.