Prevent XSS in HTML Output
Encoding user-supplied text before inserting it into HTML prevents cross-site scripting attacks where injected script tags execute in visitors' browsers.
500+ fast, free tools. Most run in your browser only; Image & PDF tools upload files to the backend when you run them.
Encode and decode HTML entities in named/basic and numeric modes.
HTML entities are the escape mechanism that allows special characters to appear in HTML without being interpreted as markup. The less-than sign (<) becomes <, the ampersand (&) becomes &, and quotation marks become " or ' — each encoding prevents the browser from treating the character as HTML syntax. This encoder/decoder lets you move freely between raw text and entity-encoded HTML. Use the encoder to safely embed user-generated content, code snippets, or mathematical expressions in HTML without breaking page structure. Use the decoder to recover plain text from an over-encoded source, read entity-heavy CMS output, or understand what a string will display as when rendered. Both named entities (©, —, ) and numeric entities (©, —,  ) are supported. All operations run instantly in your browser.
Encoding user-supplied text before inserting it into HTML prevents cross-site scripting attacks where injected script tags execute in visitors' browsers.
Handles both named entities like © and — and numeric entities like © and — in both encode and decode directions.
Correctly encodes quote characters for attribute context (href='...', onclick="...") and angle brackets for text node context, matching the HTML specification.
Recover plain text from HTML sources that double-encode entities or add unnecessary escaping, a common issue in legacy CMS and email template systems.
Optionally encode all non-ASCII characters (accented letters, emoji, CJK) as numeric HTML entities for maximum compatibility with ASCII-only email or legacy templates.
No server round-trip — encoding and decoding runs client-side so results appear immediately and your text content stays completely private.
Input: <script>alert('XSS & injection');</script>
Output: <script>alert('XSS & injection');</script>
Input: <h1>Welcome to UtilityKit</h1><p>Your "all-in-one" toolkit</p>
Output: <h1>Welcome to UtilityKit</h1><p>Your "all-in-one" toolkit</p>
Input: Copyright © 2026 — All rights reserved. Price: $19.99 & free shipping.
Output: Copyright © 2026 — All rights reserved. Price: $19.99 & free shipping.