Web
HTML entity encoder and decoder
Turn special characters into HTML entities, or read entity-encoded text in a familiar form.
Encoding replaces ampersands, angle brackets and quotes for HTML text or attributes. Decoding uses the browser’s HTML entity parser. It does not sanitize unsafe HTML or make user input safe to insert as markup.
Worked example
Display special characters as HTML text.
Example input
A & B < C
Expected result
Encoding produces A & B < C.
Before using your result
Entity encoding is not a general-purpose HTML sanitizer. Use appropriate escaping for the destination context.
How this works
Encoding replaces ampersands, angle brackets and quotes with common HTML entity references. Decoding uses your browser’s HTML parser to read named and numeric entities.
This is a text conversion tool, not a sanitizer. Do not use decoded content as trusted HTML or insert user input as markup without proper application-level protection.
Character conversion only; not HTML sanitization or a security validation tool.
Questions
Does this run locally?+–
Yes. Text is converted in your browser and is not uploaded.
Is encoded text safe to use as HTML?+–
Encoding these characters helps when displaying text, but safe HTML handling depends on where and how the output is inserted.
Does decoding execute scripts?+–
No. The decoded result is displayed as text in an output field.
