Convert characters that would otherwise be interpreted as markup into HTML entities, and decode entities back to plain characters. Essential when displaying user content or code samples.
Getting started
Paste the text or markup you want to escape or decode.
Switch between encode and decode modes.
Choose whether to escape only the essential characters or all non-ASCII characters too.
Copy the result into your template, article or code sample.
Why it helps
Escapes the five characters that actually matter for safety, rather than mangling everything unnecessarily.
Decoding is useful when content arrives double-escaped from a poorly configured system.
Extended mode escapes non-ASCII characters for legacy systems with encoding problems.
Runs locally so unpublished content stays private.
In practice
Displaying a code sample inside an HTML page without the browser rendering it.
Escaping user-submitted content before inserting it into a template.
Fixing text that shows literal '&' sequences because it was escaped twice.
Preparing content for a system that cannot handle non-ASCII characters directly.
Everything people ask most about the html entity encoder & decoder, answered plainly.
Keep exploring
More from Developer Tools and beyond — most people who use this one reach for these next.