Updated · Built and checked by the PlinzoTools team, formulas tested against published sources
Encode special characters in text into their HTML entity equivalents.
Your result will appear here.
This tool encodes special characters -- <, >, &, and quote characters -- into their HTML entity equivalents (<, >, &, etc.), so text can be safely embedded inside HTML without being interpreted as markup.
Paste your text. The HTML-entity-encoded version appears instantly, ready to copy into your markup.
The encoder replaces five characters and leaves everything else alone. The ampersand becomes &, the less-than sign becomes <, the greater-than sign becomes >, the double quote becomes ", and the apostrophe (single quote) becomes '. The ampersand is handled first so that entities created by later replacements are not encoded a second time. Accented letters, symbols such as the copyright sign, and emoji are not converted, so they remain as ordinary characters. That is fine for pages served as UTF-8, which is the default for modern sites.
Take the line: Tom & Jerry say "5 < 6" and it's true. After encoding you get: Tom & Jerry say "5 < 6" and it's true. When this is placed in an HTML page, the browser displays the original wording instead of trying to read the angle bracket as the start of a tag or the ampersand as the start of an entity.
The tool works on plain text only and does not parse markup. It does not know whether a bracket is part of a tag or part of your content, so everything that matches is encoded. Processing happens locally in your browser, and no text is sent anywhere. For very large pastes the page may respond slowly, but typical snippets convert instantly.
Only the characters that have HTML significance (< > & and quotes) -- ordinary letters, numbers, and punctuation pass through unchanged.
The tool uses the numeric form, which is understood by every HTML parser. The named apostrophe entity is not valid in older HTML versions, so the numeric code is the safer choice.
No. Only the ampersand, less-than, greater-than, double quote and apostrophe are converted. Other characters pass through unchanged.
You can, but every ampersand will be encoded again and the page will show entity codes as visible text. Encode raw text once only.
It helps for text placed in element content and quoted attributes, but safe output depends on the context. Use your framework's escaping and review security guidance for anything handling untrusted input.
Reference: MDN Web Docs