Data and JSON tools Free · No sign-up · No upload

HTML Entity Encoder

Turn characters that have a special meaning in HTML into safe entities such as < and &. Optionally encode accents and symbols too. All in your browser; nothing is uploaded.

  • No account needed
  • Nothing uploaded
  • Named or numeric entities
  • Hex option
Text
  • Runs on your device. Files are never uploaded.
  • Free and unlimited. No sign-up, no watermark.
Private: processed in your browserNo upload waitIN: Text → OUT: Entities
How was HTML entity encoder?
How it works

HTML entity encoder in three steps

No account, no email, no waiting for an upload.

  1. STEP 01

    Paste your text or code

    Add anything you need to show safely in HTML.

  2. STEP 02

    Choose the extras

    Optionally encode every non-ASCII character, use names like © where they exist, or write hexadecimal numbers.

  3. STEP 03

    Copy the result

    Paste it into your HTML, template or CMS.

What you get

What HTML entity encoder does, and what it doesn't

We'd rather tell you up front than surprise you after the download.

What you get

  • The five essentials, alwaysAmpersand, less-than, greater-than, double quote and single quote are always encoded, so the text cannot break out of markup or an attribute.
  • Non-ASCII on requestEncode accents, symbols and emoji as numeric entities, useful when a system mangles non-ASCII text.
  • Named entitiesUse readable names such as é and € for characters that have one in HTML.
  • Hex or decimal numbersChoose é or é style for the numeric forms.
  • Supports full UnicodeCharacters beyond the basic plane are encoded as a single code point, not two halves.

Good to know

  • Escaping is not sanitizingEncoding makes text safe to show as text. It does not clean HTML you want to keep. Use a sanitizer in your app for user-supplied markup.
  • Single quote as numericThe apostrophe is written as ', since ' is not part of older HTML.
  • Context mattersText for a URL needs URL encode, and text for JSON needs JSON escape.
Private by design

Your data never leave your device

The tool runs inside your browser instead of on our servers, so there is nothing to upload, store or delete afterwards.

Typical online tool upload

Your device→Their server→Your device

Your file travels over the internet, sits on someone else's computer for a while, and you wait for the upload and the download.

Mediaextractr no upload

Your device does all the work

The tool loads into your browser once, then works on your file locally. Nothing is sent, so nothing can leak.

Made for real work

When people use HTML entity encoder

Show code on a web page

Escape snippets so tags display instead of running.

Insert user text into a template

Prevent stray angle brackets from breaking layouts.

Prepare email HTML

Encode special characters so every client shows them.

Learn entities

See the code for symbols like the copyright sign.

Compare

Mediaextractr vs typical upload tools

MediaextractrPrivateTypical upload tools
Your file is uploadedNeverYes
Sign-up neededNoOften, after a few files
Daily file limitNoneOften 1–2 free files
WatermarkNeverSometimes
Wait for upload & downloadNoYes
Speed on very large filesDepends on your deviceDepends on their servers

Why escape HTML

Browsers treat < and & as the start of tags and entities. If your text contains them, the page can break or, in the worst case, run unwanted markup. Replacing them with &lt; and &amp; makes the browser show them literally.

Quotes matter inside attributes: an unescaped double quote can end the attribute early.

Named, decimal or hex

All forms display the same character. Choose by need:

  • Named, such as &copy;: easiest to read in source code.
  • Decimal, such as &#169;: works for every character.
  • Hex, such as &#xA9;: matches Unicode charts.
  • Reverse any of them with the HTML entity decoder.
  • For XML files, see the XML validator.

A short example: HTML entity encoder

The snippet <a href="x">Tom & Jerry</a> becomes &lt;a href=&quot;x&quot;&gt;Tom &amp; Jerry&lt;/a&gt;, which a page can show as visible code. With non-ASCII encoding on, the text café becomes caf&#233;, or caf&eacute; if you also enable names. Decimal and named forms render the same in every browser.

FAQ

Questions, answered

How do I escape HTML characters?

Paste the text and copy the result. The characters & < > and quotes are always escaped.

Is the HTML I paste sent to a server?

No. Characters are replaced by script in this tab, and your snippet is not uploaded.

Can I encode accented letters too?

Yes. Tick 'Also encode every non-ASCII character'.

What are named entities?

Readable codes like &copy; and &eacute;. Characters without a name use numbers.

Does this protect against XSS?

Escaping text before showing it is one part of that. It is not a complete sanitizer for HTML you want to keep.

Will it run on an iPhone or Android phone?

Yes. Paste your snippet in a current mobile browser and copy the escaped version.