Developer tools

HTML Entity
Encoder Decoder

Encode special characters or turn HTML entities back into text.

Processed in your browser

Convert HTML entities

Conversion settings

Reserved characters are & < > and both quotes.

Input

The selected file is the input until you clear it. Its preview is read-only; convert to read it.

Choose an operation and convert your text. Empty text is valid.

Result

Each run converts once. Decoded markup stays plain text and is never rendered. HTML decoding replaces invalid numeric code points and remaps some legacy control references; see the rules below.

How it works

  1. Add text

    Paste text or choose a UTF-8 file. Files stay in your browser.

  2. Choose options

    Encode special characters or decode entities once.

  3. Use the result

    Inspect the plain text, then copy or download it.

Good to know

Named and numeric entities represent the same characters. Choose a scope to escape only reserved characters, include non-ASCII text, or encode every character.

Decoding runs once and never renders markup. HTML text, attribute and semicolon-required contexts handle incomplete references differently.

HTML replaces invalid numeric references and remaps some legacy controls. A warning appears when encoding would change a decoding round trip.

Common questions

Which characters and entity formats can I encode?

Reserved scope escapes &, <, > and both quotes. Non-ASCII scope also escapes characters such as é and 😀. All characters includes spaces and line breaks. Named format uses named entities where available, with hexadecimal fallback; decimal and hexadecimal use Unicode code points.

What do the decoding contexts change?

HTML text accepts legacy names without semicolons: &notit; becomes ¬it;. In attribute context it stays literal because a letter follows the name. Semicolon-required mode leaves incomplete references unchanged. All contexts replace numeric references to zero, surrogate code points or values above U+10FFFF with � and remap selected C1 controls: &#128; becomes €.

Does the tool render HTML or make it safe to insert anywhere?

No HTML is parsed, rendered or executed here. Both editors display plain text. Entity encoding is for HTML text or quoted attribute values; it is not a sanitizer for JavaScript, CSS, URLs, unquoted attributes or arbitrary HTML documents. Decoding can restore executable markup if you later insert it into a page.

What happens to unknown or malformed entities?

Unknown names and references without valid digits stay literal. In text context, a valid legacy name at the start of a longer sequence may decode partially. Names are case-sensitive. Numeric references with valid digits can decode without a semicolon in text and attribute modes; semicolon-required mode leaves them literal.

Does it convert nested entities repeatedly?

Each run makes one pass: &amp;lt; becomes &lt;, not <. Encoding already encoded text escapes its ampersands again. Use as input lets you choose another conversion explicitly. Nothing is trimmed or Unicode-normalized.

How are files, Unicode and line endings handled?

Files must contain valid UTF-8; invalid byte sequences show an error. A leading BOM is preserved as a character and is encoded if selected by the character scope. No BOM is otherwise added. File conversion, Copy result and downloads preserve the actual line endings; text boxes display CR and CRLF as LF. Pasted input and Use as input also normalize line endings to LF. Literal unpaired surrogates are rejected to prevent a lossy UTF-8 download.

Is my text saved or sent anywhere?

Conversion and file reading run in your browser. Input and file names are never uploaded, logged or put in browser storage. Copy writes to your clipboard; Download saves only when you choose. Reset releases the input and result. Decoded links and markup are never fetched.

Can I cancel large conversions?

There is no fixed input-size limit. Browser memory and string limits still apply. Cancel stops processing and retains the input. Changing settings or input clears the previous result and stops pending work. Resource failures show an error so you can retry. Clipboard failure leaves the result selectable for manual copy.

Related tools: URL Encoder Decoder · Base64 Encoder Decoder