DEVELOPER WORKBENCH

HTML Entity Encoder & Decoder

Encode HTML special characters, escape non-ASCII text or encode every code point. Decode semicolon-terminated named and numeric character references as plain text.

Browser-based processingEditable examplesCopy + download

Paste input or try the example.

Decodes references once, with required semicolons; unknown names remain unchanged. Output is plain text. HTML encoding does not replace validation for JavaScript, CSS or URL contexts.

Open a UTF-8 text file

Using HTML Entity Encoder & Decoder

Encode HTML special characters, escape non-ASCII text or encode every code point. Decode semicolon-terminated named and numeric character references as plain text.

  1. Paste your input, open a UTF-8 file or load the example.
  2. Choose the operation and settings, then click Convert entities.
  3. Read the status and limitations, then copy or download the output.

Example

<a title="Café & tea">Hello 👋</a>
Decodes references once, with required semicolons; unknown names remain unchanged. Output is plain text. HTML encoding does not replace validation for JavaScript, CSS or URL contexts.

Questions & answers

Which characters are escaped?

Basic mode encodes &, <, >, double quotes and single quotes. Non-ASCII mode also encodes characters above U+007F. Every-code-point mode writes numeric references for all characters.

Does decoding run the HTML?

No. Only individual character references are decoded. Tags in your source remain literal text, and the result is never inserted as executable page content.

Why did an entity stay unchanged?

This tool decodes once and requires a semicolon. Unknown named references stay unchanged. Nested escaping such as &amp;lt; becomes &lt; on the first pass.

Can I use this to secure every input?

No. This helps encode HTML text and quoted attribute values. JavaScript, CSS, URL and unquoted attribute contexts need different handling. Input is limited to 250,000 characters.

Help improve this tool

Report a problem or suggest an improvement

Describe the issue without pasting private tool input. Feedback goes to our admin inbox.

Find another tool · Read practical guides