HTML Entities Encoder & Decoder
Encode special characters to HTML entities, or decode them back to text.
What are HTML entities?
HTML entities are special codes used to display characters that would otherwise be interpreted as HTML markup or are hard to type. For example, < represents <, and & represents &. Encoding these prevents browsers from misinterpreting your text as tags.
Why encode HTML entities?
- Display code or markup as literal text on a web page.
- Prevent broken layouts when content contains
<,>, or&. - Reduce one class of injection issues by escaping user-supplied content.
The key characters
&→&<→<>→>"→"
Is my data safe?
Encoding and decoding run entirely in your browser.
Frequently asked questions
Which characters get encoded?
The HTML-significant characters ampersand, less-than, greater-than, and double-quote are converted to their named entities, so browsers render them as literal text instead of markup.
Does encoding HTML entities prevent XSS?
Escaping output is one important layer against injection, but it is not a complete XSS defense on its own. Combine it with context-aware encoding and a Content Security Policy.
Is it free and private?
Yes — it's free and unlimited, and encoding and decoding happen entirely in your browser.