HTML Entity Encoder & Decoder
Encode special characters to HTML entities or decode HTML entities back to text
Enter text and click Encode/Decode to convert
About This Tool
HTML entities are special sequences used in HTML to represent characters that have reserved meaning in the markup language, such as <, >, &, and quotes. Without proper encoding, these characters can break HTML structure, cause rendering issues, or create security vulnerabilities like cross-site scripting (XSS). Our free online HTML entity encoder and decoder lets you instantly convert special characters to their HTML entity equivalents (&, <, >, ", ', ) and back again. It also supports numeric character references in both decimal ({) and hexadecimal ({) formats, covering the full Unicode range. All processing happens in your browser for complete privacy.
How to Use
- To encode text, paste your plain text into the input area. The tool will convert characters like <, >, &, ", ', and non-breaking spaces into their corresponding HTML entity references.
- To decode HTML entities, paste the entity-encoded string into the input area and switch to Decode mode. The tool will convert named entities (&, <, etc.) and numeric entities ({, {) back to their original characters.
- Click the "Convert" button to process your input. The result will appear in the output panel, ready to copy.
- Use the "Swap" button to exchange the input and output values. This automatically switches the mode (Encode to Decode or vice versa), making it easy to reverse a previous conversion.
- Copy the result to your clipboard with one click, or clear both fields to start a new conversion.