HTML Entity Encoder/Decoder
Encode text to HTML entities or decode entities back to text. Editing either side updates the other automatically.
Encode text to HTML entities or decode entities back to text. Editing either side updates the other automatically.
HTML entities are codes that stand in for characters which would otherwise be interpreted as markup or can't be typed reliably. A few are reserved: & becomes &, < becomes <, > becomes >, double quote becomes ", and the apostrophe becomes '. Others give you characters that are awkward to enter directly, like © for ©, — for an em dash, or for a non-breaking space. Entities come in named form (©), decimal numeric form (©), and hex numeric form (©).
Type or paste plain text on the left to escape it into entities, or paste entity-encoded text on the right to decode it back. Both sides update as you type. Pick Minimal mode to escape only the five reserved markup characters (best for dropping user text into a page), or All non-ASCII mode to also convert every accented letter, symbol, and emoji into an entity so the output is pure ASCII.
Displaying code samples on a page without the browser running them. Showing literal < and > characters in text. Preventing markup injection when you echo user input. Keeping output ASCII-only for systems that mangle non-ASCII bytes. Decoding entity-laden HTML you scraped or copied so you can read it as normal text.