How to use HTML Entity Encoder and Decoder
- Choose encode or decode.
- Paste your text or HTML.
- Copy the result.
About this tool
Encoding replaces &, <, >, quotation marks and apostrophes with entities so the text displays literally instead of being parsed as markup. You can also convert every non-ASCII character to a numeric entity for ASCII-only systems.
Decoding understands the common named entities plus decimal and hexadecimal numeric entities.
Frequently Asked Questions
- Does encoding prevent XSS?
- Escaping output is one part of preventing cross-site scripting, but the correct escaping depends on the context, so rely on your framework's built-in escaping.
- Which named entities are supported when decoding?
- The most common ones, such as &, <, >, ", , © and €, plus all numeric entities.
Related tools
- URL Encoder and DecoderPercent-encode text for use in URLs, or decode an encoded string back to readable text.
- Base64 Encoder and DecoderConvert text to Base64 and back without breaking non-English characters.
- Morse Code TranslatorConvert English text to dots and dashes, or decode Morse back to text.
- Fancy Text GeneratorGenerate stylish Unicode text for Instagram bios, captions and usernames.
- Text to Binary ConverterSee the bytes behind your text, or decode bytes back into readable text.
- Readability Score CheckerFind out how easy your English writing is to read.