Input

Output

Type to encode.

Encode and decode HTML entities

Convert reserved and special characters to HTML entities so they display correctly in markup, or decode entity references back to plain text. Everything runs in your browser, so nothing is uploaded.

What it does

  • Encode: escapes &, <, >, " and ', with an option to encode all non-ASCII characters as numeric references.
  • Decode: resolves numeric references (&#169;, &#xA9;) and common named entities (&copy;, &mdash;, …).

Useful workflows

  • Safely embed code samples and user input in HTML.
  • Clean up copy-pasted content with smart quotes and dashes.
  • Pair with the code beautifier or JSON tool when preparing markup and data.

Frequently asked questions

Why encode HTML entities?

Characters like < and & have special meaning in HTML. Encoding them prevents broken markup and cross-site scripting when displaying untrusted text.

Is my text uploaded?

No. Encoding and decoding happen locally in your browser.

Which entities can it decode?

All numeric references (decimal and hex) plus the common named entities. Numeric encoding covers any Unicode character.