HTML entity encoder and decoder

    Escape < > & " for HTML, or decode &amp; style entities.

    Your text stays on this device

    About the HTML Entity Encode & Decode tool

    This HTML entity encoder and decoder escapes text for safe use in HTML by turning < > & " and ' into entities, and decodes entities such as &amp;, &nbsp;, &#169; and &#x20B9; back into characters. Decoding understands every named HTML5 entity; encoding can also convert non-ASCII characters like é, ₹ and emoji into decimal or hex codes. For example, encoding <b>₹500</b> with "Also encode non-ASCII" ticked gives &lt;b&gt;&#8377;500&lt;/b&gt;.

    At a glance

    Always encoded
    & < > " and ' (as &amp; &lt; &gt; &quot; &#39;)
    Options
    Encode non-ASCII, prefer names like &copy;, hex numbers
    Decodes
    All named HTML5 entities plus decimal and hex codes
    Price
    Free, no sign-up
    Works in
    Your browser, on phone or computer. Works offline after the first visit.
    Privacy
    What you type never leaves your device.

    How to encode or decode HTML entities

    1. Choose Encode or Decode.
    2. Type or paste your text.
    3. Copy the result. For encoding, choose whether non-ASCII characters are converted too.

    Private

    Your text stays in your browser and is never sent to a server.

    Instant

    Results update as you type, with nothing to install.

    Free

    No sign-up, no limits and no ads inside your writing space.

    HTML Entity Encode & Decode: frequently asked questions

    Which characters must be escaped in HTML?

    Always escape & as &amp; and < as &lt;. Inside attribute values also escape " as &quot; (or ' as &#39;). Escaping > as &gt; is optional but common.

    What is the entity for the rupee sign ₹?

    There is no named entity for ₹; use the numeric code &#8377; (decimal) or &#x20B9; (hex). Encode with "Also encode non-ASCII" ticked to get it.

    What does &nbsp; mean?

    &nbsp; is a non-breaking space: a space that keeps the words on either side on the same line. Decoding turns it into that special space character, which looks like a normal space.

    Is my text sent anywhere?

    No. Everything runs in your browser and your text never leaves your device. Nothing is stored on any server.