HTML entities encoder. Escape safely, decode instantly.
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, < 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 © 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.
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 & or ©; 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
-
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.
-
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.
-
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.
-
Choose named or numeric codes
With Prefer named entities ticked, which is the default, you get readable names such as &, © and é wherever the tool knows one. Untick it to get decimal codes such as & and © for every character it converts.
-
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.
-
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 & Jerry and every < becomes <, while Café, € and © stay as they are.
- Switch the sample to Encode all non-ASCII and é becomes é, € becomes € and © becomes ©. Untick Prefer named entities and they become é, € and © 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 ', which old HTML 4 pages and some email clients do not know. Untick it to get ' when you target those.
- Encoded text must go into the HTML source, not into a rich text editor's visual view. Pasting & into a visual editor usually shows the code itself on the page.
- Encoding the same text twice turns & into &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.
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 (
©), decimal (©) and hex (©), 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
&, or compact numeric ones. - Copy anything instantly, the result, or any code in the common-entities reference table with a single click.
Frequently asked questions.
Is the HTML Entities Encoder free?
Is it private? Is my text uploaded anywhere?
What is the difference between named and numeric entities?
Which characters should I always escape in HTML?
Does it work offline?
Published · Last updated .