HTML Entity Encoder

Developer & Data

Encode text to HTML entities or decode them back.

Options

Mode

Text / HTML input

Encoded output

0 characters in · 0 out. Processed entirely in your browser.

What is HTML Entity Encoder?

HTML Entity Encoder escapes the characters that break or exploit markup — &, <, >, " and ' — into safe HTML entities, and decodes entities back to plain text. Switch between Encode and Decode with one click, and optionally convert every non-ASCII character to a numeric entity so your markup stays pure ASCII. Decoding understands both named entities like &amp; and numeric ones like &#38;. Everything runs in your browser, so your text is never uploaded.

How to use HTML Entity Encoder

  1. Pick Encode or Decode

    Choose Encode to turn raw text into entity-escaped HTML, or Decode to turn entities back into readable text. The labels change to match.

  2. Enter your text

    Type or paste into the input box, or use Load file to open a .txt or .html file. The result updates live as you type.

  3. Optionally encode all non-ASCII

    In Encode mode, turn on 'Also encode all non-ASCII' to convert accents, emoji, and other characters into numeric entities like &#233; — useful when a document must stay strictly ASCII.

  4. Decode any entities

    Decode resolves both named entities (such as &amp;, &lt;, &copy;) and numeric ones (such as &#38; or &#x26;) back to the original characters.

  5. Copy or download

    Use Copy to grab the result, or Download to save it as a text file.

Common uses

  • Escape user input before inserting it into a web page to prevent XSS
  • Show literal HTML tags in a tutorial or documentation code sample
  • Decode entity-encoded text pulled from an RSS feed or API
  • Force a document to pure ASCII by encoding accents and emoji
  • Safely place text containing < > & inside an HTML attribute
  • Clean up copied markup that arrived double-encoded

Why choose FreeTools

100% private

Your files are processed inside your browser and are never uploaded to a server.

Free, no account

No sign-up, no watermark, no paywalled “premium” tier. Just open a tool and use it.

Instant

No upload, no queue, no server round-trip — work starts the moment you drop a file.

Runs in your browser

Built on open web standards. Works on any modern desktop browser, nothing to install.

No upload size caps

Nothing leaves your device, so there’s no server file-size limit — only your machine’s memory.

Yours to keep

Results download straight to your device in clean, standard file formats.

Frequently asked questions

Related tools