Online Free Tools
  • Home
  • Tools
  • Dev Logs
  • English
  • 中文
  • Español
  • العربية
  • Português
  • Bahasa Indonesia
  • Français
  • 日本語
  • Русский
  • Deutsch

Tools

Check HTTP Response Headers OnlineWhat Is My IP Address — See Your Public IPMarkdown ↔ HTML Converter — Sanitize & PreviewCompare Two Texts Online — Text Diff CheckerYAML ↔ JSON Converter — Types, Multi-doc & LocalCSV ↔ JSON Converter — Types, Delimiters & LocalHTML Entity Encoder & Decoder — Escape, Unescape & LocalAdd WWW to DNS — A/CNAME, Apex Rules & Provider GuidesIndexNow — Bing URL Submit, Key Check & Status CodesBMI Calculator — How to Calculate Body Mass IndexROI Calculator — How to Calculate Return on InvestmentMarginal Revenue Calculator — Formula MR = ΔTR / ΔQSquare Feet to Square Meters — Area Converter for Homes & RenovationPercentage Change Calculator — From Old Value to NewGradient Calculator — Multivariable ∇f (Partial Derivatives)

HTML Entity Encoder & Decoder — Escape, Unescape & Local

Encode or decode HTML character references in your browser. Steps: pick Encode or Decode, paste text, choose scope (minimal, non-ASCII, or all) and output form (named, decimal, hex), then copy. Example: Tom & Jerry → Tom & Jerry. Handles ©, ©, and emoji like 😀 — paste stays local.


      

How it works

Choose Encode to turn characters into HTML character references, or Decode to reverse them. Encoding runs character-by-character in this tab — pick a scope (which characters to escape) and an output form (named like ©, decimal ©, or hex ©). Decoding uses a safe textarea parse; the preview shows plain text only, never rendered HTML.

Rules you should expect

What to expect when you encode or decode: which characters change, how named and numeric references relate, and common pitfalls.

  • Minimal scope escapes only & < > " ' — enough for typical HTML text nodes. Non-ASCII scope leaves ASCII as-is and turns symbols and emoji into entities. All combines both.
  • Named (&copy;), decimal (&#169;), and hex (&#xA9;) forms decode to the same character. When encoding with “Named when available”, common symbols use names; others fall back to numeric entities.
  • Double encoding happens if you encode already-escaped text — & becomes &amp;amp;. Use Decode → “Until stable” once if you suspect double escaping. Attribute values in real HTML may also need quotes escaped even when text nodes do not.
  • Privacy: your paste is not uploaded. This tool uses zero external libraries — conversion stays entirely in the browser.

Example

Encode (minimal + named): Tom & Jerry <3 → Tom &amp; Jerry &lt;3. Encode (non-ASCII + hex): © 😀 → &#xA9; &#x1F600;. Decode: &lt;p&gt;Tom &amp; Jerry &copy; &#x1F600;&lt;/p&gt; → plain text `<p>Tom & Jerry © 😀</p>` in the preview.

Good fits

  • Developers: decode `&lt;div&gt;…` strings from an API or log before diffing or editing.
  • CMS / content: encode titles or snippets that contain & or < before inserting into an HTML template.
  • Email / i18n: turn emoji or special symbols into numeric entities for older HTML clients.

Frequently asked questions

What is the difference between encoding scopes?

Minimal escapes only the five HTML-critical characters (& < > " '). Non-ASCII leaves plain ASCII alone and encodes everything above U+007F. All applies minimal rules plus non-ASCII — use it when you want both safety and Unicode coverage.

Are &copy;, &#169;, and &#xA9; the same?

Yes when decoding — all three become ©. When encoding, pick Named for readable names where available, or Decimal/Hex if you need a specific numeric form for templates or email.

What if my text was encoded twice?

You may see &amp;amp; instead of &. Decode once normally, or choose Decode → Until stable to repeat until the string stops changing (up to eight passes). Avoid encoding output that is already escaped.

Does this sanitize HTML or prevent XSS?

No. Encoding helps represent characters safely in HTML source, but it is not a sanitizer. The decode preview shows plain text only — we never render your input as live HTML in the page.

Does my text leave the browser?

No. Conversion runs locally with built-in browser APIs only — no CDN library fetch and no upload of your paste.

Related tools

  • Markdown ↔ HTML Converter — Sanitize & Preview
  • Compare Two Texts Online — Text Diff Checker

Share this tool

Share on social networks, copy the page link, or use your device share sheet.

XFacebookLinkedInRedditWhatsAppTelegram

https://onlinefreetools.org/tools/html-entity

Questions or feedback

Something unclear, broken, or missing? Draft a message below — we read every note about these tools.

Email: dailyonetools@outlook.com

References

  • WHATWG — Character references
  • W3C — HTML 4 character entities
Online Free Tools · Learning project · Iterating · About