Developer
HTML entity encoder
Encode special characters as HTML entities, or paste entities and decode them back to readable text. The result is shown as plain text only.
Runs locally in your browser
How it works
Encoding handles the five characters that matter in markup, always in the safe order: the ampersand becomes & first, so no entity this tool creates is decoded again by mistake, then < becomes <, > becomes >, the double quote becomes " and the apostrophe becomes '. Decoding runs a single pass over the common named entities (&, <, >, " and ) and over decimal and hexadecimal numeric forms, so a sequence such as &lt; decodes exactly one level. Input is capped at 20,000 characters, and the result is written into a read-only text box rather than into the page as markup.
Worked example
Encoding the fragment <b>Tom & Jerry's</b> gives <b>Tom & Jerry's</b>. Decoding that output returns the original <b>Tom & Jerry's</b> character for character. Encoding a plain string such as hello world returns it unchanged, and an unknown entity such as &foo; is left exactly as typed instead of being silently dropped.
Questions and answers
Everything runs in your browser: your text, file or value is never uploaded anywhere.