Developer Tools
HTML Entity Encoder & Decoder
Escape HTML-sensitive characters or decode entities back into readable markup and text.
Result
How to use
Encode ampersands, angle brackets, quotes, and apostrophes for safe display, or decode named and numeric HTML entities.
- Paste raw HTML, text, or an entity-encoded snippet.
- Choose entity encoding or decoding.
- Copy the result into markup, templates, docs, or test data.
Best for
- Code examples in HTML
- Template debugging
- Entity cleanup in imported content
Why the result matters
- Encoding common HTML-sensitive characters prevents them from being interpreted as markup when displayed as text.
- Context-specific output escaping is still required when inserting untrusted values into a real application.
Example inputs
- Encode a button tag for documentation
- Decode & and '
- Escape a comparison expression
FAQ
Which characters are encoded?
The encoder handles ampersands, angle brackets, double quotes, and apostrophes.
Can it decode numeric entities?
Yes. Browser-native decoding supports common named, decimal, and hexadecimal HTML entities.
Is this a full HTML sanitizer?
No. Entity conversion and HTML sanitization solve different problems.
Does processing happen locally?
Yes. The content stays in your browser.