HTML Encoder/Decoder
Encode and decode HTML entities instantly with our free online tool
HTML encoded/decoded result will appear here
How to use this HTML Encoder/Decoder:
- Select mode - Encode (text to HTML entities) or Decode (HTML entities to text)
- Choose the encoding type (HTML, hexadecimal, or decimal entities)
- Enter your text in the left input box
- Click Convert to transform your data
- View the result in the right panel
- Click Copy to copy the result to clipboard
- Click Swap to quickly switch between input and output
- Click Clear All to reset both input and output
- For quick conversion, use the keyboard shortcut
Ctrl+Enter
(Windows) orCmd+Enter
(Mac)
About HTML Encoding:
- HTML encoding converts special characters to entities that can be safely displayed in HTML
- Essential for preventing XSS (Cross-Site Scripting) attacks when displaying user-generated content
- Three encoding types:
- HTML Entities: &name; format (e.g., < for <)
- Hexadecimal Entities: &#xHH; format (e.g., < for <)
- Decimal Entities: &#DDD; format (e.g., < for <)
- Common encoded characters:
- < becomes < or < or <
- > becomes > or > or >
- & becomes & or & or &
- " becomes " or " or "
- Always encode user input before displaying it in HTML to prevent injection attacks
Your data is processed in your browser only - we never store or send your input/output to any server