<strong>Free & fast</strong>
5 entities changed
- Mode
- encode
- Input characters
- 28
- Changed positions
- 43
Entity encoding helps display code examples as text. It is not a complete sanitizer for untrusted HTML.
Use this free HTML entity encoder and decoder to turn HTML characters into display-safe entity text or convert entity codes back to readable text.
<strong>Free & fast</strong>
5 entities changed
Entity encoding helps display code examples as text. It is not a complete sanitizer for untrusted HTML.
Show HTML code examples inside a blog post, guide, or documentation page.
Decode copied entity text so it is easier to read.
Escape short snippets before placing them in visible HTML text.
Check whether a string changed after encoding or decoding.
Confirm whether numeric entities such as $ or & decode to the expected characters.
5 entities changed from 28 input characters: <strong>Free & fast</strong>
7 entities changed into readable HTML text: <span title="A&B">Save</span>
title="Calculator" data-label="A&B"
2 numeric entities changed: Price $9.99 & no tracking
Need a slower walkthrough, a related tool, or the full library? These links keep you close to the task you started.
Plain-language answers about when to use the tool, what it does with your inputs, what to double-check, and how privacy works.
Use it when your task matches one of these common needs: Show HTML code examples inside a blog post, guide, or documentation page. Decode copied entity text so it is easier to read. It works best when you already know the text, code, URL, mode, format, or technical setting the page asks for.
In plain language: Encode mode replaces &, <, >, double quotes, and apostrophes with &, <, >, ", and '. Decode mode converts the supported named entities amp, apos, copy, gt, lt, nbsp, quot, and reg, plus valid decimal entities such as $ and hexadecimal entities such as &, back to characters. The examples on the page are there so you can compare your inputs with a filled-out example before copying the answer.
Encode characters mode: Use this when you want text such as <strong>Free & fast</strong> to show as visible code instead of being interpreted as HTML markup. Decode entities mode: Use this when copied text contains entity codes such as <, &, ", $, or & and you want to read the characters again. Entity count: The result counts how many characters or entity codes were converted. For example, <strong>Free & fast</strong> changes 5 entities when encoded. Changed positions: This is a quick difference check between input and output text. It helps confirm that encoding or decoding actually changed the snippet. Security boundary: Encoding helps display code as text. It does not validate HTML, remove unsafe scripts, or make untrusted user input safe to render as real markup.
Read the output next to your original input. If the tool changes format, units, encoding, spacing, or capitalization, compare a small sample before copying the whole result into another app.
Entity encoding is useful for displaying code examples as text, but it is not a complete sanitizer for untrusted HTML or script content. Also check the selected mode, input format, encoding, and whether the text includes private keys, passwords, or sensitive data.
Encode mode changes ampersands, less-than signs, greater-than signs, double quotes, and apostrophes. Those become &, <, >, ", and ' so the snippet can be shown as text in HTML.
No. It focuses on the characters that most often break visible HTML text or code examples. Regular letters, numbers, spaces, punctuation, and symbols that do not need escaping are left alone.
Yes. Decode mode supports valid decimal entities such as $ and hexadecimal entities such as & when the code point is in the valid Unicode range.
The compact decoder supports amp, apos, copy, gt, lt, nbsp, quot, and reg. Unknown named entities are left unchanged so you can spot text that needs a fuller entity reference.
Ampersands start entity codes in HTML. Encoding a plain ampersand first prevents text such as A&B from being confused with an entity-like sequence when the snippet is displayed.
No. Entity encoding is useful for showing code examples as text. Sanitizing untrusted HTML is a separate security job that needs a maintained sanitizer and clear allowlist rules.
Use URL encoding for query strings, path values, and links. Use HTML entity encoding for text that will be displayed inside HTML. The two formats solve different problems.
No. The tool runs in your browser tab. Your recent answers stay only on the page while you use it, and they are not sent to a server.