HTML Entities
Convert special characters like <, >, &, and quotes to their HTML entity equivalents and back. Supports named entities, numeric codes, and hex codes.
<h1 class="title">Hello & "World"!</h1> <p>Price: €29.99 © 2026</p>
Common HTML entities ▸
Frequently Asked Questions
When do I need to encode HTML entities?
Always encode user-provided content before inserting it into HTML to prevent XSS attacks. Characters like <, >, &, and " must be escaped. Use minimal encoding for HTML attributes and content, full encoding when extra safety is needed.
What is the difference between minimal and full encoding?
Minimal encodes the 5 critical characters (&, <, >, ", ') that can break HTML or enable XSS. Full additionally encodes all non-ASCII characters (like é, ©, →) as numeric entities, creating pure ASCII output safe for any HTML context.
What is a non-breaking space ( )?
is an HTML entity for a space that won't be collapsed or line-broken. Use it to prevent line breaks between words (e.g., '10 KB') or to add extra spacing in HTML where multiple spaces would be collapsed.