HTML Entity Encoder and Decoder
Escape special characters for HTML display or turn encoded entities back into readable text.
Popular in this group
Switch tools without re-entering your text.
About this tool
HTML Entity Encoder and Decoder — HTML entities represent characters such as <, >, &, quotes, and non-breaking spaces without letting the browser treat them as markup.
Encoding is useful for displaying code samples; decoding helps inspect content copied from HTML or feeds.
How to use it
- Paste the source text or entity string.
- Choose Encode or Decode.
- Copy the result and test it in the intended HTML context.
Example
<strong>Tom & Sara</strong>
<strong>Tom & Sara</strong>
Encoding text for display is not the same as sanitizing untrusted HTML.
Common uses
- Display code examples on a webpage.
- Inspect content received with HTML entities.
- Prepare literal text for templates.
What to know
- Escaping rules depend on whether data is placed in HTML, an attribute, CSS, or JavaScript.
- Do not rely on entity encoding alone to remove malicious markup.
Privacy: The operation runs locally in your browser; your input is not uploaded by this tool.
Frequently Asked Questions
Does entity encoding sanitize unsafe HTML?+
Not by itself. Safe rendering depends on the output context and a proper escaping or sanitization strategy.
What is the difference between & and &?+
Both can represent an ampersand; one is a named entity and the other is numeric.
Will all Unicode characters be encoded?+
The tool focuses on characters that need or commonly use HTML entity representation.