HTML Entities Encoder
Encode text to HTML entities or decode them back — instantly, in your browser.
How it works
HTML entities let you display characters that would otherwise be interpreted as markup — like <, >, & and " — or that aren't easy to type. This tool encodes your text into safe HTML entities, or decodes entities back into plain characters, entirely in your browser. When you press Encode, the five reserved characters are turned into their compact named entities (& < > " '), and every character above standard ASCII — accents, symbols, emoji — is converted to its numeric entity, such as é for é. The result reappears below in a read-only box, ready to copy, and nothing you enter is ever uploaded.
Encoding and decoding
Paste text and press Encode to make it HTML-safe — useful when you need to show code samples, user-supplied text, or special characters inside a page without the browser taking them for tags. Paste entities and press Decode to recover the original text; the decoder reloads the string through the browser's own HTML parser, so it understands both named entities (é for é) and numeric ones (é for é) exactly as a live page would. Whichever direction you go, the Copy button drops the result onto your clipboard so you can paste it straight into your editor, email or content management system.
A concrete example
Imagine you have written a tutorial and want to show readers the literal text <a href="page.html">Link</a> without the browser rendering it as an actual link. You paste that snippet in, press Encode, and the tool returns <a href="page.html">Link</a> — a string that appears as readable code on screen instead of becoming a clickable element. The sample already in the window works the same way: encoding Fish & chips <chips> "£5" wraps the ampersand, angle brackets and the £ symbol so the whole line is safe to drop into a page.
What to expect
The tool always converts both directions in one place: the same input box feeds Encode and Decode, and the result lands in the output below it. Encoding produces named entities for the five reserved characters and numeric entities for everything non-ASCII, so non-Latin scripts, currency signs and emoji are all handled without special setup. Decoding is lenient — the browser's parser accepts a much wider range of entities than any hand-written list could, so practically any valid entity you paste comes back as the intended character. The widget does not offer options, quantities or file handling: it is a single-purpose, browser-side transformer of the text you type, which is precisely what makes it safe for sensitive or private strings.
Common problems and fixes
If you press Decode on plain text that contains no entities, the output simply stays the same — that is expected, not a bug, since there is nothing left to decode. When copy fails or seems silent, make sure your browser allows clipboard access and that the output box actually contains the result before copying. If encoded output looks longer or more verbose than you expected, remember that entities are naturally longer than the characters they represent, so a wide accented string can grow noticeably. And if you pasted a fragment that mixes text with entities, the decoder will still interpret every entity it recognises — if you only wanted a raw string shown literally, encode it first rather than hand-typing angle brackets.
Frequently asked questions
Does it use named or numeric entities?
Both, deliberately. The five reserved characters become named entities (& < > " '), which are short and readable, while every character above standard ASCII becomes a numeric entity such as £ for £. The decoder accepts both kinds back again.
Can it decode any entity?
Yes. Decoding runs the string through the browser's own HTML parser, so it handles every named and numeric entity the browser itself understands, exactly as a live page would.
Is my text uploaded?
No. Encoding and decoding happen entirely in your browser and nothing you enter leaves your device, which makes it safe for passwords, private snippets and unpublished drafts.
Does it handle emoji and other symbols?
Yes. Any character with a code point above 127 — accents, currency signs, non-Latin scripts and emoji — is encoded as its numeric entity and decoded back just as faithfully.
Why is my encoded output so long?
Entities always take more characters than the characters they replace, and many accents produce a multi-character entity. The trade-off is a result that is safe to embed in any HTML document.
Is encoding the same as escaping for HTML injection?
Encoding the five reserved characters is the core of escaping text before it is displayed, and it neutralises the markup that injection relies on. It is an important first line of defence, though you should still treat user input as untrusted data.