Skip to main content

HTML Entities

Convert text and HTML entities live, in either direction, with named or numeric formats.

Free & unlimited
Direction
Entity scope
Text

37 chars

Entities
<p>Café & "quotes" — naïve résumé</p>

89 chars

All processing happens in your browser. No data is sent to any server.

About this tool

  1. 1

    Enter your text

    Paste HTML content or plain text containing special characters into the input area.

  2. 2

    Choose the operation

    Select Encode to convert special characters to HTML entities, or Decode to convert entities back to characters.

  3. 3

    Select encoding style

    Choose between named entities (&), numeric entities (&), or hexadecimal entities (&).

  4. 4

    Copy the result

    Copy the encoded or decoded text from the output panel.

  • Always encode user-generated content displayed in HTML to prevent XSS (cross-site scripting) attacks.
  • Named entities (e.g., &) are more readable; numeric entities (e.g., &) have broader compatibility.
  • Common entities to know: &amp; for &, &lt; for <, &gt; for >, &quot; for ", and &apos; for '.
  • Use decode to clean up HTML content that was double-encoded or to extract readable text from HTML source.
  • Supports named, numeric, and hexadecimal entity formats
  • Encodes all HTML5 named entities
  • Real-time encoding and decoding as you type
  • Reference table of common HTML entities
  • Handles Unicode characters and emoji encoding
  • Encode special characters in HTML content to prevent rendering issues
  • Sanitize user input before displaying it in web pages to prevent XSS attacks
  • Decode HTML entities in scraped web content to extract plain text
  • Prepare code snippets for display in HTML without the browser interpreting the tags
Named entities use a mnemonic (e.g., &amp;) while numeric entities use the Unicode code point (e.g., &#38;). Named entities are more readable but not available for every character.
At minimum, encode < (&lt;), > (&gt;), & (&amp;), " (&quot;), and ' (&apos;) to prevent HTML parsing issues and security vulnerabilities.
Yes. Emoji and other Unicode characters can be encoded as numeric HTML entities (e.g., &#128512; for a smiley face).

Related tools

View all

We use anonymous analytics to improve ToolChamp. No personal data is stored or sold. Privacy Policy