HTML Entity Codec Description
Encode or decode HTML entities in your text. This tool converts special characters into their HTML entity equivalents and vice versa.
How to use
- Enter the text containing HTML entities or special characters.
- Choose 'Encode' to convert characters to entities (e.g.,
<to<). - Choose 'Decode' to convert entities back to plain text.
Common Scenarios
- Displaying code snippets on web pages without triggering HTML parsing.
- Preventing Cross-Site Scripting (XSS) by escaping user input.
- Handling special symbols or non-ASCII characters in HTML source code.
Data Structure
HTML entities can be named (like ©) or numeric (like ©). They always start with & and end with ;.
Principles
Encoding replaces reserved HTML characters with their corresponding entity strings. Decoding parses these sequences and returns the original character.