Convert sensitive HTML characters and Unicode text into safe, compliant HTML entities. Supports Named, Decimal, Hexadecimal, and Non-ASCII encoding with instant live preview and bidirectional decoding.
Safely escape HTML markup (&, <, >, ", ') and convert international Unicode characters into Named entities, Decimal references, or Hexadecimal codes for safe web display.
Follow these 6 simple steps to convert any text, raw markup, or code snippet into safe, compliant HTML entity character references:
Type or paste raw HTML tags, text with symbols, or code blocks into the left input textarea. You can also upload a .txt or .html file.
Choose whether to escape only core HTML characters (&, <, >, ", '), include named symbols, non-ASCII diacritics, or every character.
Select your preferred format: human-readable Named Entities (©), Decimal numeric (©), or Hexadecimal (©).
Enable Prevent Double Encoding if your text already contains entities, customize apostrophe styling, or convert line breaks to <br>.
Review the generated entities in real time. The statistics grid shows exact character counts, converted tokens, and byte expansion ratio.
Click Copy Result to paste safe HTML directly into your web templates, CMS, or markdown files, or click Download .txt to save the file.
The following table lists the most frequently used special characters, their official HTML entity representations, and Unicode code points:
| Char | Character Name | Named Entity | Decimal Entity | Hexadecimal Entity | Standard Usage & Context |
|---|---|---|---|---|---|
| & | Ampersand | & |
& |
& |
Must always be escaped to avoid entity collision |
| < | Less-Than Sign | < |
< |
< |
Must be escaped to prevent opening tags |
| > | Greater-Than Sign | > |
> |
> |
Prevents closing tags in HTML text nodes |
| " | Double Quotation Mark | " |
" |
" |
Prevents breaking double-quoted HTML attributes |
| ' | Single Quote (Apostrophe) | ' |
' |
' |
Prevents breaking single-quoted HTML attributes |
| Non-Breaking Space | |
  |
  |
Prevents line breaks between words | |
| © | Copyright Symbol | © |
© |
© |
Copyright notices in website footers |
| ® | Registered Trademark | ® |
® |
® |
Registered brand names and product titles |
| ™ | Trademark Sign | ™ |
™ |
™ |
Unregistered trademark indicator |
| € | Euro Currency Sign | € |
€ |
€ |
European currency pricing |
| £ | Pound Sterling Sign | £ |
£ |
£ |
British currency indicator |
| — | Em Dash | — |
— |
— |
Typographical parenthetical clause dash |
| … | Horizontal Ellipsis | … |
… |
… |
Three-dot continuation punctuation |
< or ") ensures that user-supplied text will be rendered safely inside standard HTML body text nodes (e.g., between <p> and </p>) and quoted HTML attributes. However, HTML entity encoding alone does not prevent vulnerabilities if content is placed inside JavaScript execution blocks (<script>), inline event handlers (onclick), CSS stylesheets (<style>), or unquoted URL attributes (href). Always use context-aware escaping libraries (e.g. Blade's {{ $var }}, OWASP Java Encoder, or DOMPurify) for full defense-in-depth.
<p>, <div>, <span>.<pre><code> without executing them.title="..." or value="...".\x27, \u003C).encodeURIComponent().onclick="..." undergoes dual interpretation.\22).The PacesTools HTML Encoder runs 100% inside your local web browser using client-side JavaScript. Your confidential source code, draft blog posts, proprietary HTML templates, and personal customer data are never transmitted across the network, stored in remote databases, or logged on any server.
All Unicode code point calculations, regex replacement routines, named entity mappings, and text file downloads execute directly on your device's CPU. The tool is fully functional offline.
Everything you need to know about HTML entity encoding, numeric references, and best practices:
<, >, and &) into their equivalent HTML entity character references (such as <, >, and &). This informs web browsers to display the characters as literal visible text rather than interpreting them as executable markup.
< and & without browsers mistaking them for tag boundaries or entity starters.© for ©, € for €) regardless of document encoding or keyboard limitations.& (Ampersand) → &< (Less-than sign) → <> (Greater-than sign) → >" (Double quote) → "' (Single quote / apostrophe) → ' or '© for ©). They are easy for developers to remember and read.
©). Numeric entities are universally supported across all HTML, XML, and XHTML parsers, even if an XML parser does not know HTML named entity definitions.
©), while hexadecimal entities use base-16 numbers preceded by an x (e.g., ©). Both render identically in web browsers. Hexadecimal entities directly correlate with Unicode hex notation (U+00A9) and are often preferred in developer tools and Unicode documentation.
é, ñ, ü), Greek/Cyrillic scripts, and symbols into numeric or named references. This is useful for legacy ASCII-only storage systems.
<script>), CSS styling rules, or unvalidated URL links (href="javascript:..."). Contextual escaping specific to each language layer is required.
<div>) is encoded again, resulting in &lt;div&gt;. By default, the encoder treats all input as literal text. However, when you check the "Prevent Double Encoding" option, the tool detects existing valid entities and preserves their ampersands without re-encoding them.
Streamline your development, writing, and encoding workflows with other free utilities on PacesTools: