Developer

HTML Encoder / Decoder

Encode text to HTML entities or decode HTML entities back to text. Escape for JavaScript strings, CSS selectors, HTML attributes or content. Full entity reference included. Free, fast, and runs entirely in your browser.

🔒 100% private. Encoding and decoding happens locally in your browser.

Output

The result appears here as you type.
Convert now Ctrl+Enter

HTML entity reference

Click any code to copy it. Search by name, character or description; names missing from this list are looked up in the full HTML5 table of 2,231 entities.

CharNamedDecimalHexDescription

What is this tool?

This HTML encoder and decoder escapes special characters so text shows up safely in a web page, and turns HTML entities back into plain characters. Input and output sit side by side and convert as you type, with Auto picking encode or decode. Choose the entity style (named like &, decimal like & or hex like &) and what to encode: only the five special characters, those plus every non-ASCII character, or everything. Decoding uses the full HTML5 table of 2,231 named entities plus decimal and hex references, and Preview renders the output as HTML in a sandbox with scripts blocked. Other tabs escape text for JavaScript strings, JSON, URLs and CSS identifiers, and undo those escapes. A searchable entity reference lets you copy any named, decimal or hex code with one click. Everything runs locally in your browser.

How to Use

  1. Paste your text or entities into Input. The output updates as you type.
  2. Leave the direction on Auto, or choose Encode or Decode.
  3. Pick a Style (Named, Decimal or Hex) and what to Encode. Tick Also ` and = when the text goes inside an HTML attribute.
  4. Switch to the JavaScript, JSON, URL or CSS tab for those escapes.
  5. Copy the output, use Preview to see it rendered, or click a code in the entity reference to copy it.

Frequently Asked Questions

Which characters does Encode HTML escape?

By default only & < > " and '. Choose Those plus non-ASCII to also encode accented letters, symbols and emoji, or Every character to encode everything. The attribute option adds the backtick and the equals sign.

Does encoding convert accented letters or emoji to entities?

Only if you ask it to. Set Encode to Those plus non-ASCII or Every character. With the Named style, characters that have a name, like &eacute;, use it, and the rest get a numeric reference.

Can it decode numeric entities like &#8364;?

Yes. Decode HTML Entities handles named, decimal, and hex entities. It uses the browser's own HTML parser.

Other tools

There are more calculators, converters and editors on Wivrix. If something is missing, tell us.