HTML Entity Encoder
Escape markup so browsers display it instead of parsing it
Free Online HTML Entity Encoder
The moment you paste a code sample or a sentence containing < or & into a web page, the browser tries to interpret it as markup. Encoding those characters as HTML entities makes the page show exactly what you typed - essential for docs, blogs, and templates.
- Angle brackets escaped - < becomes < and > becomes >
- Ampersands handled safely - & becomes & so existing text is never misread as an entity
- Quotes escaped - double quotes become " for safe use inside attributes
- Slashes hardened - forward slashes are written as /, so closing tags in samples can never break out
How to Encode HTML Entities
- Open the HTML entity encoder
- Paste the text or markup you want to display literally
- Click "Convert" to get the entity-escaped version
- Paste the output into your HTML where the text should appear
Example Conversion
Input (Text / HTML):
<p>Tom & Jerry said "5 > 3"</p>
Output (Entity-Encoded):
<p>Tom & Jerry said "5 > 3"</p>
Common Use Cases
Code Samples in Posts
Show readers real tags in a tutorial without the browser rendering them.
Documentation Examples
Embed markup examples in docs and READMEs that render on the web.
Template Safety
Escape user-generated text before dropping it into a page template.
Attribute Values
Put sentences containing quotes into HTML attributes without breaking the tag.