Quicker

HTML Encoder / Decoder

Free online HTML entity encoder and decoder. Instantly encode special characters to HTML entities (&, <, >, ") or decode them back. Supports named and numeric entities.

Input

Output

Enter text to encode or decode

Share:B!

How to Use

  1. Choose mode

    Select "Encode" to convert special characters to HTML entities, or "Decode" to convert entities back to plain text.

  2. Paste text

    Enter your text in the input field. The result updates automatically.

  3. Copy the result

    Click "Copy" to copy the output, or "Swap" to reverse the input and output.

FAQ

HTML entities are special character sequences used to represent characters that have special meaning in HTML (such as < and >) or that are not easily typed. For example, & becomes &amp;, < becomes &lt;, and > becomes &gt;.

You need to encode HTML when displaying user-generated content, inserting text into HTML attributes, or preventing XSS (cross-site scripting) vulnerabilities. Always encode untrusted input before inserting it into HTML.

Named entities use a readable name (e.g., &amp;amp;, &amp;lt;). Numeric entities use the Unicode code point (e.g., &amp;#38;, &amp;#60;). Both are valid HTML. Named entities are more readable; numeric entities work for any character.

This tool correctly encodes characters that can cause XSS (& < > " '). However, proper XSS prevention also depends on context (HTML attributes, JavaScript, CSS) and should be handled by your server-side framework.