HTML Entity Converter
Two-way HTML entity conversion. Encode: turn & < > " ä into & < > " ä so text is safe to drop into HTML without breaking markup or enabling script injection. Decode: turn <b>, é, ©, © and named entities back into real characters. Runs entirely on your device.
🔒 100% Client-Side & Private — processed locally in your browser. Files never leave your device.
Options
Your result will appear here
Type or paste your input above, adjust the options, then press Run. Tip: press Ctrl+Enter to run, and ? for every shortcut.
How it works
Encode and decode, two directions
This tool converts text to HTML entities or back again. Encoding turns the characters that break HTML markup — &, <, >, and the quotes — into their named entities, so pasted text cannot close a tag or inject a script. Decoding takes &, <b>, é, © and numeric forms like © or © back to real characters. The mode is usually detected automatically from which kind of string you pasted.
When each direction helps
Encode before you drop user-supplied or copied text into a page, a template or an email where it would otherwise be parsed as markup. Decode when you received an entity-laden string — an RSS feed, an old export, a caption with — or — and you want the plain text it represents. The encodeAll switch goes further and also turns every printable non-ASCII character into a numeric entity, which is handy for an ASCII-only target charset.
How auto-detect decides
If the text contains entity-looking fragments such as &, A or é it decodes; if it contains raw <, > or & it encodes. A string that has both kinds is ambiguous, so the mode option lets you force the direction rather than guess. Unknown entity names and malformed fragments are left untouched rather than destroyed, so decoding is safe on text you are not sure about.
Scope of the tables
Encoding covers the five characters that make HTML unsafe plus apostrophes, and optionally all printable non-ASCII as numeric entities. Decoding understands the full HTML4 named set plus HTML5 entities and both decimal and hexadecimal numeric forms, so the common cases and the obscure ones are both handled in this tab with no network lookup.
Nothing is uploaded
Both directions run entirely on your device. The text you convert never leaves this tab, so you can safely encode a snippet you do not want a hosted converter to see, and the tool works offline.
Questions
When is auto-detect used?
If the text contains &-entities such as &, A or é, it decodes; if it contains raw <, > or & it encodes. Force a direction with the mode option when a string has both.
What does Encode do exactly?
Replaces & < > " and ' with their named entities, and apostrophes/quotes as configured. With "Encode all printable non-ASCII" it also turns é, ≤ and similar into numeric entities — handy when the target charset is ASCII-only.
Which entities can be decoded?
All named HTML4 entities (&, ©, é, and the rest), numeric decimal and hexadecimal forms (©, ©), and any HTML5 entity. Unknown fragments are left untouched.
Is the result valid to paste anywhere?
The encode output is valid HTML text. The decode output is always plain text. Both are safe to copy into any editor.
Related tools
See categoryUnicode Normalizer
Normalize Unicode text, optionally remove accents and standardize line endings.
URL Encode / Decode
Percent-encode or decode text for use in URLs — component or whole-URL mode.
Text to Binary
Encode text as 8-bit binary (UTF-8 aware) or decode a string of 0s and 1s back to text.
String Escaper
Escape or unescape text for JS, JSON, C, Java, Python, shell, SQL, CSV, HTML, XML, URL, backslash or Unicode.