Convert text to HTML entities and decode named or numeric entities back into readable characters.
Quick answer: Paste text, choose Encode or Decode, and convert special characters to safe HTML entities—or entities back to readable text—instantly.
Was this tool helpful?
Your vote is stored only in this browser and helps you remember whether the tool worked for your task.
Advertisement
How this html entities helps
This HTML entity encoder and decoder helps you safely display code, markup, symbols, and special characters in web pages. Encoding converts characters such as &, <, >, quotes, and non-ASCII symbols into named or numeric entities. Decoding converts entities back to readable text when you are inspecting copied markup, feed content, templates, or legacy CMS output. You can encode only the essential characters or encode all non-ASCII characters as numeric references for strict transport contexts. The tool runs in the browser and displays unsafe input as text rather than executing it. Copy, download, examples, and local history make repeated conversions fast. It is especially useful for documentation authors, developers preparing code snippets, and anyone debugging why a page displays raw tags instead of rendered markup.
Last updated: . All processing happens locally; no tool input is sent to a server.
Real-world examples
Display code safely
Encode <div> as <div> before placing it in documentation.
Inspect feed content
Decode &, <, and numeric entities from copied markup.
Transport special symbols
Encode non-ASCII punctuation as numeric entities for a strict legacy system.
Frequently asked questions
Why must < and & be encoded?
They have special meaning in HTML. Encoding them displays the characters literally instead of treating them as markup.
Correct contextual escaping is an important defense, but complete XSS prevention also requires sanitization, safe APIs, and a strong Content Security Policy.
Can it decode named entities?
Yes. Common named, decimal, and hexadecimal entities are decoded by the browser parser without rendering unsafe markup.