Skip to content

HTML entities encoder. Escape safely, decode instantly.

Local only
Encoded

Text never leaves your browser, encoding and decoding run entirely on your device.

Common entities

Click any code to copy it.

Char Named Numeric Description

Entities, without the lookup tab

HTML entities let you show characters the browser would otherwise treat as markup, &lt; instead of a raw <, for example. Paste text and this tool escapes the five special HTML characters, or every non-ASCII character if you need maximum compatibility, choosing readable named entities like &copy; or compact numeric ones. Flip to Decode and it turns named, decimal and hex entities back into plain characters, including emoji and other astral-plane code points. Swap the result back in with one click to round-trip and verify. No account, nothing uploaded, free forever.

§ · written guide

How to use the HTML Entities Encoder

This tool turns characters that HTML would read as markup into entities, and turns entities back into plain characters. Encoding swaps a character for a code such as &amp; or &#169;; decoding reads named, decimal and hex entities and puts the real character back. It is for developers, writers and anyone pasting text into HTML, templates or a CMS that mangles special characters.

Step by step

  1. Choose a direction

    Press Encode to turn plain text into entities, or Decode to turn entities back into text. The page opens in Encode with a sample sentence already converted, so you can see the result before you type.

  2. Paste your text

    Type or paste into the left box, labeled Plain text when encoding and Encoded text when decoding. The result appears in the right box a moment after you stop typing. Press Load sample to bring the example back, or Clear to empty both boxes.

  3. Pick how much to encode

    These options show only in Encode mode. Encode special only, the default, escapes just the five characters & < > " and ' and leaves everything else alone. Encode all non-ASCII also converts accented letters, symbols and emoji, so the output is plain ASCII.

  4. Choose named or numeric codes

    With Prefer named entities ticked, which is the default, you get readable names such as &amp;, &copy; and &eacute; wherever the tool knows one. Untick it to get decimal codes such as &#38; and &#169; for every character it converts.

  5. Copy or round trip the result

    Press Copy to put the result on your clipboard. Press Swap to move the result into the input and flip the direction, which is a quick way to check that decoding gives back exactly what you started with.

  6. Grab a single entity

    Scroll to the Common entities table under the tool. Click any code in the Named or Numeric column to copy just that entity.

Reading the result

  • With the sample in Encode special only mode, Tom & Jerry becomes Tom &amp; Jerry and every < becomes &lt;, while Café, € and © stay as they are.
  • Switch the sample to Encode all non-ASCII and é becomes &eacute;, € becomes &euro; and © becomes &copy;. Untick Prefer named entities and they become &#233;, &#8364; and &#169; instead.
  • The count above the result box shows its length in characters, which helps when a field has a length limit.
  • In Decode mode, a name the browser does not recognize, such as a typo like &cpoy;, is left as it is rather than removed, so you can spot it.

Tips and common mistakes

  • For text that goes inside HTML or an attribute value, Encode special only is usually all you need. Encode all non-ASCII is for systems that break on accented letters or emoji.
  • With Prefer named entities ticked the apostrophe becomes &apos;, which old HTML 4 pages and some email clients do not know. Untick it to get &#39; when you target those.
  • Encoded text must go into the HTML source, not into a rich text editor's visual view. Pasting &amp; into a visual editor usually shows the code itself on the page.
  • Encoding the same text twice turns &amp; into &amp;amp;. If you see that, run Decode once to undo the extra layer.

Privacy and limits

Encoding and decoding run in your browser. Your text is not uploaded or saved, so a reload clears it. Decoding uses the browser's own list of HTML entity names, so it works offline once the page has loaded.

Back to the tool

§ 02 · what you can do

Everything an encoder should do.

  • Encode special characters, &, <, >, " and ', to safe HTML entity form.
  • Encode all non-ASCII characters (accented letters, symbols, emoji) to numeric entities for maximum compatibility.
  • Decode HTML entities, named (&copy;), decimal (&#169;) and hex (&#xa9;), back to plain text.
  • Swap encode and decode in one click to round-trip your content and verify correctness.
  • Choose named or numeric output: human-readable named entities like &amp;, or compact numeric ones.
  • Copy anything instantly, the result, or any code in the common-entities reference table with a single click.
§ 04 · faq

Frequently asked questions.

Is the HTML Entities Encoder free?
Yes, completely free for everyone. No sign-up, no account and no usage limits.
Is it private? Is my text uploaded anywhere?
No upload, ever. Encoding and decoding run entirely in your browser on your own device, your text never leaves your computer.
What is the difference between named and numeric entities?
Named entities like &copy; are human-readable shorthands; numeric entities reference the character's Unicode code point directly, in decimal (&#169;) or hex (&#xa9;) form. This tool encodes to either style, tick "Prefer named entities" for readable output, and decodes all three.
Which characters should I always escape in HTML?
The five specials: ampersand (&amp;), less-than (&lt;), greater-than (&gt;), double quote (&quot;) and apostrophe (&#39;). They can be parsed as markup or break attribute values if left raw. The "Encode special only" mode escapes exactly those five and leaves everything else untouched.
Does it work offline?
Yes, once the page has loaded, encoding, decoding, swapping and copying all keep working without a connection, because every conversion runs locally in your browser.

Published · Last updated .

Priya sent you a message Online now

Talk to a Developer Now

Share your name and email to reply.

Reply