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
- Runs on your device. Files are never uploaded.
- Free and unlimited. No sign-up, no watermark.
HTML entity encoder in three steps
No account, no email, no waiting for an upload.
- STEP 01
Paste your text or code
Add anything you need to show safely in HTML.
- STEP 02
Choose the extras
Optionally encode every non-ASCII character, use names like © where they exist, or write hexadecimal numbers.
- STEP 03
Copy the result
Paste it into your HTML, template or CMS.
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.
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 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
The tool loads into your browser once, then works on your file locally. Nothing is sent, so nothing can leak.
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.
Mediaextractr vs typical upload tools
| MediaextractrPrivate | Typical upload tools | |
|---|---|---|
| Your file is uploaded | Never | Yes |
| Sign-up needed | No | Often, after a few files |
| Daily file limit | None | Often 1–2 free files |
| Watermark | Never | Sometimes |
| Wait for upload & download | No | Yes |
| Speed on very large files | Depends on your device | Depends 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 < and & 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 ©: easiest to read in source code.
- Decimal, such as ©: works for every character.
- Hex, such as ©: 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 <a href="x">Tom & Jerry</a>, which a page can show as visible code. With non-ASCII encoding on, the text café becomes café, or café if you also enable names. Decimal and named forms render the same in every browser.
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 © and é. 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.