HTML Entity Encoder
Developer ToolsEscape or unescape HTML entities safely.
Your text
Result
What is HTML Entity Encoder?
HTML Entity Encoder escapes or unescapes HTML special characters to prevent markup breaking or injection.
How to use HTML Entity Encoder
- 1 Paste your text or HTML.
- 2 Choose Encode or Decode.
- 3 Copy the escaped result.
Supported formats and limits
- Input: text
- Output: HTML entities (or decoded text)
- Runs in your browser
Common uses
- Escape characters before inserting text into HTML.
- Decode entities found in scraped or legacy content.
- Safely display reserved characters such as < and &.
Things to know
- It escapes characters; it does not sanitise untrusted HTML.
- It does not parse or validate full HTML documents.
Privacy and file handling
All processing happens in the browser.
Frequently asked questions
Why escape HTML entities?
Escaping stops characters like < and & from being interpreted as markup, which protects against broken layout and injection.
Why encode HTML entities?
It stops characters such as < and & from being read as markup, which helps avoid broken output and some injection issues.
Can I convert entities back to characters?
Yes. The tool decodes HTML entities as well as encoding them.
Will it escape quotes?
Yes. Common characters, including quotes and angle brackets, are converted to their entity forms.
Related tools
Base64 Encoder
Encode and decode Base64 text safely in your browser.
URL Encoder / Decoder
Encode or decode URL components and full URLs.
HTML Minifier
Minify HTML by removing comments and unnecessary whitespace.
JSON Formatter
Format, validate, and minify JSON with clear error messages.