HTML Entities
Encode and decode named HTML entities, JSON strings, and JavaScript escape sequences online.
Common HTML Named Entities Reference
How to Use HTML Entities
- 1Step 1
Paste your markup snippet or text string into the input editor.
- 2Step 2
Select whether to Encode to HTML Entities or Decode from Entities.
- 3Step 3
Toggle between HTML entity mode and JavaScript string escape mode.
- 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.
Input & Output Transformation Examples
<div class="card">Hello & Welcome</div>
<div class="card">Hello & Welcome</div>
© 2026 BitSmith — Free Utilities
© 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 (©, &) or numeric decimal entities (©, &).
Does decoding risk executing malicious scripts?
No. Decoding parses entity codes in memory without creating active DOM elements or executing inline script tags.