HTML Entity Encoder (Extended)

Paste text and convert every non-ASCII character to its &#nnn; numeric HTML entity reference instantly.

Use the HTML Entity Encoder (Extended)

Encoded Output
Copied!

Summary

The HTML Entity Encoder converts every non-ASCII character in your text into its numeric HTML entity reference (e.g. é for é). It also optionally encodes ASCII special characters like <, >, &, and quotes. The output is safe to embed directly inside HTML attributes, body content, email templates, and XML documents without risking rendering or injection issues.

How it works

  1. Paste or type your text into the input box.
  2. Choose encoding options: encode only non-ASCII, or also encode ASCII special characters.
  3. The encoder converts each character to its decimal numeric entity reference (&#nnn;).
  4. Copy the encoded output with one click.
  5. Use the decode tab to reverse the process and recover original text.

Use cases

  • Safely embed accented European characters in legacy HTML templates.
  • Encode user-generated content before inserting it into HTML attributes.
  • Prepare multilingual text for HTML email clients with limited charset support.
  • Encode special symbols in XML or XHTML documents.
  • Obfuscate email addresses in HTML source to reduce spam harvesting.
  • Debug character encoding issues by inspecting code points.
  • Convert emoji and Unicode symbols to portable entity references.
  • Sanitize pasted text before publishing in a CMS.

Frequently Asked Questions

Last updated: 2026-05-23 · Reviewed by Nham Vu