HTML Entities

Encoding & Decoding

Encode and decode named HTML entities, JSON strings, and JavaScript escape sequences online.

Input String
Result
<div class="hero">Welcome & Discover "BitSmith" © 2026</div>

Common HTML Named Entities Reference

&
&
&
<
&lt;
&#60;
>
&gt;
&#62;
"
&quot;
&#34;
'
&apos;
&#39;
©
&copy;
&#169;
®
&reg;
&#174;
™
&trade;
&#8482;
—
&mdash;
&#8212;
–
&ndash;
&#8211;
&nbsp;
&#160;
€
&euro;
&#8364;

How to Use HTML Entities

  1. 1Step 1

    Paste your markup snippet or text string into the input editor.

  2. 2Step 2

    Select whether to Encode to HTML Entities or Decode from Entities.

  3. 3Step 3

    Toggle between HTML entity mode and JavaScript string escape mode.

  4. 4Step 4

    Copy the safe escaped string to your clipboard or pick from the entity cheat sheet.

Technical Specification & Client Security

HTML entity encoding replaces sensitive markup characters with named and numeric references (&, <, >, ", '). Decoding uses browser-native text decoders without injecting unsafe HTML into the active document DOM.

›100% Client-side execution without server round-trips
›Instant real-time output updates as you type
›One-click copy and clear buttons with verified confirmation toast
›Zero data telemetry or external network calls
›Accessible keyboard navigation and mobile-first responsive design
›Browser-native execution in local memory

Input & Output Transformation Examples

Encode Raw HTML Tags to Named Entities
Input:
<div class="card">Hello & Welcome</div>
Output:
&lt;div class=&quot;card&quot;&gt;Hello &amp; Welcome&lt;/div&gt;
Decode Numeric HTML Entities
Input:
&#169; 2026 BitSmith &#8212; Free Utilities
Output:
© 2026 BitSmith — Free Utilities

Frequently Asked Questions

Why should I encode HTML entities?

Encoding special characters like <, >, and & prevents browser rendering bugs and protects web applications against cross-site scripting (XSS) when displaying user content.

Does this tool support both named and numeric entities?

Yes. You can encode to named entities (&copy;, &amp;) or numeric decimal entities (&#169;, &#38;).

Does decoding risk executing malicious scripts?

No. Decoding parses entity codes in memory without creating active DOM elements or executing inline script tags.

Related Developer Utilities