DEVELOPER TOOL
HTML Entity Encoder / Decoder
Escape text to safe HTML entities, or decode entities back to text.
About this tool
Escape special characters (like <, >, &, and quotes) into their safe HTML entity form so text can be embedded inside HTML without being interpreted as markup, or decode entities back into plain readable text.
Frequently asked questions
- Why would I need to encode text for HTML?
- If you're inserting user-supplied or arbitrary text directly into an HTML page, encoding the special characters first prevents it from being parsed as tags or attributes — a basic safeguard against broken layout or script injection.
- Which entities are handled?
- The core five: & < > " and ' (apostrophe), plus common named entities like and numeric entities (' or ') when decoding.
- Is decoding safe to use on untrusted text?
- Yes — decoding here only converts entity text back to characters for you to read; it doesn't render or execute anything, so pasting untrusted HTML to decode is safe.