HTML Entity Encoder Decoder
Encode text to HTML entities or decode entities back, including named entities.
Characters as entities, both ways
HTML entities let you represent characters that HTML treats specially, or that are hard to type, as safe codes — the ampersand, the angle brackets, a copyright symbol, an accented letter. This encodes text into entities and decodes entities back to characters, covering both the named entities and the numeric ones.
Paste text to encode it, or entities to decode them.
Named versus numeric
There are two ways to write an entity: a named form that is human-readable for common characters, and a numeric form that works for any character by its code point. Encoding is what keeps special characters displaying as text rather than being parsed as markup, and it is a core defence against injecting unintended HTML from user content. Decoding is how you read a string that has arrived full of entities. Whether you are preparing code to show on a page or making sense of encoded HTML, having both directions covers the job.
Questions & answers
What is the difference between named and numeric entities?
Named entities are readable codes for common characters; numeric entities work for any character by its code point. Both mean the same character.
Why encode to entities?
So special characters display as text instead of being parsed as markup — also a defence against injecting unintended HTML.
Is my text uploaded?
No. The conversion happens in your browser.