HTML Entity Encoder/Decoder
An online tool to convert between HTML special characters and entities.
How to Use the HTML Entity Converter
Select the "Encode" tab and enter text containing HTML special characters to convert &, <, >, ", ' and other special characters into HTML entities. Select the "Decode" tab and enter text containing entities to restore them to the original characters. Both named entities (&) and numeric entities (&) are supported.
What are HTML Entities?
HTML entities are a notation for representing characters that have special meaning in HTML or characters that cannot be directly typed from the keyboard. For example, < (less-than sign) is interpreted as the start of an HTML tag, so to display it as text, you need to write <. Entities come in named (&) and numeric (& or &) formats. Converting user input to entities when outputting to HTML is important for XSS (Cross-Site Scripting) prevention.
Frequently Asked Questions (FAQ)
Q. Which characters are encoded?
A. The five characters with special meaning in HTML (&, <, >, ", ') are converted to named entities.
Q. Can numeric entities be decoded?
A. Yes, numeric entities such as & (decimal) and & (hexadecimal) are supported for decoding.
Q. Is my input data safe?
A. All conversion processing is completed within your browser. Input data is never sent to any server.