HTML Encoder & Decoder
About this tool
Browsers treat characters like <, >, and & as markup, not text — which is why pasting raw code into a web page either breaks the layout or silently disappears. Encoding replaces these special characters with HTML entities (<, >, &, ") so they display literally. Beyond display, encoding is a front-line defense against cross-site scripting (XSS): user input rendered unescaped can execute as JavaScript. This tool encodes text into entities and decodes entities back to characters, handling the five core XML entities plus common named ones. Use it when embedding code samples in blog posts, preparing content for a CMS that strips tags, writing email templates, or debugging why an API response shows & instead of &.
Privacy: all processing happens in your browser. Nothing is uploaded or stored.