Appearance
Accent color
Font size
Layout density
Preferences are saved on this device for the entity tool only.
Entity cheat sheet Click Copy or Insert — respects your selected format
HTML Entity Encoder & Decoder — escape anything
Turn <,
>,
& and
quotes into safe entities — or decode them back to characters. Named, decimal, and hex formats.
The basics
One character, three ways to write it
Every entity — named, decimal, or hexadecimal — renders as the exact same glyph in the browser.
Named entity
&
Readable — preferred in markup
Decimal entity
&
Universal — works everywhere
Hex entity
&
Compact — developer favorite
All render as
&
Ampersand · U+0026
Why it matters
Three reasons escaping isn’t optional
Render code correctly
Paste a <div> into a page without entities and the browser renders it — your tutorial becomes invisible markup. Escaping turns markup into displayable text.
Defuse injection attacks
Escaping user-generated content is the primary defense against stored XSS: <script> becomes harmless <script> text instead of executable code.
Pass HTML validation
A raw & in an attribute or URL makes your markup invalid. Proper entities keep documents well-formed for browsers, parsers, and crawlers.
Quick reference
The essential entity cheat sheet
Twelve entities cover 95% of everyday markup escaping.
| Char | Name | Named | Decimal | Hex | Use for |
|---|---|---|---|---|---|
| & | Ampersand | & | & | & | Must escape — always |
| < | Less than | < | < | < | Must escape in content |
| > | Greater than | > | > | > | Escape in content |
| " | Double quote | " | " | " | Escape in attributes |
| ' | Apostrophe | ' | ' | ' | Escape in attributes |
| ␣ | Non-breaking space | |   |   | Prevents line breaks |
| © | Copyright | © | © | © | Legal notices |
| ® | Registered | ® | ® | ® | Trademarks |
| ™ | Trademark | ™ | ™ | ™ | Brand marks |
| € | Euro | € | € | € | Pricing |
| — | Em dash | — | — | — | Typography |
| × | Multiplication | × | × | × | Math & dimensions |
How to use
Escape in four steps
From raw markup to safe entities in seconds — no server round-trips, no accounts, no limits.
- 1
Paste your text or markup
Drop in plain text with special characters — or a chunk of HTML entities you want decoded back to readable form.
- 2
Choose your entity format
Pick named (&), decimal (&), or hexadecimal (&) output. All three render identically in browsers.
- 3
Get instant output
The conversion happens live in your browser — no submit, no server, no delay. Reserved characters are handled automatically.
- 4
Copy and paste into your code
One click copies the escaped result, ready for your markup, template, feed, or documentation.
Use cases
Where entities earn their keep
Anywhere a character could be mistaken for markup — or mangled by a parser.
Code snippets in articles
Publishing HTML, JSX, or XML examples? Encode the markup so readers see the tags instead of rendering them.
User-generated content
Comments, forum posts, and reviews must be entity-escaped before rendering — the front line of XSS prevention.
Meta tags & attributes
Quotes and ampersands inside attribute values — titles, alt text, hrefs — need escaping or they terminate the attribute early.
Email templates
Older email clients mangle raw special characters. Entities make typographic symbols bulletproof across clients.
Sitemaps & feeds
XML sitemaps and RSS feeds require escaped &, <, and > inside <loc> and <title> — unescaped characters break parsing.
SEO-safe symbols
Entities let you use ™, ©, and — in titles and descriptions without charset headaches on legacy platforms.
Deep dive
Named vs. numeric entities
Same rendered output, different trade-offs in your source.
&named;
Human-friendly- Self-documenting —
©reads as © at a glance - Limited to the ~250 names in the HTML5 spec
- Preferred for hand-edited markup and documentation
&#numeric;
Universal- Covers every Unicode codepoint — no exceptions
- Decimal (
©) or hex (©) — both valid - Best for programmatic escaping and rare symbols
FAQ
Entity questions, answered
What is an HTML entity?
An HTML entity is a text sequence that represents a character: it starts with & and ends with ;. Entities exist for two reasons — reserved characters like < and & would otherwise be parsed as markup, and hard-to-type symbols like © or — can be written in plain ASCII. Browsers decode entities back to the real character when rendering.
Should I use named or numeric entities?
Named entities (&, <, ©) are readable and self-documenting — use them when a name exists. Numeric entities (& or &) cover every Unicode codepoint, including characters with no name. Functionally identical; pick named for common characters and numeric for rare ones.
Which characters must always be escaped?
The ampersand & — always, since it starts every entity. Less-than < and greater-than > — in text content and attributes. Double and single quotes — inside attribute values that use that quote style. Everything else is optional in UTF-8 documents but often worth escaping for clarity.
Do HTML entities prevent XSS?
Entity encoding output is a core XSS defense: escaping <, >, &, and quotes in user content converts injected markup into inert text. It’s necessary but not sufficient alone — context-aware escaping, Content Security Policy, and sanitizing rich text all play a role. This tool handles the escaping step.
If my page is UTF-8, do I still need entities?
For the five reserved characters (& < > " and quotes in attributes), yes — charset doesn’t matter, they’re structural. For everything else, UTF-8 lets you write © or — directly. Entities remain useful when editing in ASCII-only tools, templating languages, or legacy systems with unreliable charsets.
Does entity encoding affect SEO?
Entities render identically to raw characters, so Google reads © and © the same way. Where it helps indirectly: escaped markup in your content doesn’t accidentally render, valid HTML parses more reliably, and properly escaped titles/snippets display correctly in SERPs and social previews.
Is my text uploaded anywhere?
No. Encoding and decoding run entirely in your browser with zero network requests. Paste production markup, internal templates, or unreleased content freely — it never leaves the tab and is gone when you close it.
Keep going
More markup & encoding tools
URL Encoder / Decoder
Encode or decode URLs, query parameters, and percent-encoded strings.
Base64 Encoder / Decoder
Encode text to Base64 or decode Base64 back to plain text.
HTML Minifier
Minify HTML to reduce page size and stay under Google's 2MB crawl limit.
Schema Markup Generator
Create JSON-LD structured data for articles, products, FAQ, and events.
<your_markup/> → safe
Make your markup bulletproof
Escape reserved characters before they break your layout — or your security posture. Free, instant, and completely private.