Map Extract
Free tool

HTML entity encoder and decoder

Turn text into HTML-safe characters before you paste it into a web page, email template or CMS field, or turn &, £ and ' back into readable text. The result updates as you type.

Runs in your browser. Nothing you enter is uploaded.

Example: business names that came out of a scrape garbled

Text copied from page source, an RSS feed or some exports keeps its HTML entities, so a list of local firms ends up with names like Smith & Sons and prices like £45. Pasting the column into the box with Decode entities selected gives clean text you can put back into the spreadsheet.

Named entities, decimal numbers and hexadecimal numbers are all handled in the same pass.

Input
Smith & Sons · £45 + VAT · it's "done" ✓
Result
Smith & Sons · £45 + VAT · it's "done" ✓

Encoding or decoding

  1. Paste the text

    Plain text, a snippet of HTML or a whole column of values. Presets offer a code sample, some already-encoded text and a sentence full of quotes and apostrophes to try.

  2. Choose the action

    Encode only the five characters that break HTML, encode with named entities such as £ and é, encode every non-ASCII character as a number, or decode.

  3. Check the result

    The output box updates instantly. For decoding, check that characters such as the pound sign and accented letters look right.

  4. Copy or download

    Copy the result or download it as a text file.

The three encoding styles on one line

The same sentence, with an accent, a pound sign and quotes, encoded each way.

StyleOutput for: Café menu: "Fish & chips" £9.50, 10% off
Encode < > & " ' onlyCafé menu: &quot;Fish &amp; chips&quot; £9.50, 10% off
Named entitiesCaf&eacute; menu: &quot;Fish &amp; chips&quot; &pound;9.50, 10% off
All non-ASCII as numbersCaf&#233; menu: &quot;Fish &amp; chips&quot; &#163;9.50, 10% off

Which style to pick

For a modern web page or email saved as UTF-8, the minimal style is enough: it only changes the characters that would otherwise be read as HTML. Use named entities when you want the source to stay readable to a person editing it later. Use numeric entities when text has to survive an old system that mangles anything outside basic ASCII, such as some email platforms, legacy CMS fields or a CSV that will be opened with the wrong encoding.

Encoding is not the same as making user input safe in every context. Text placed inside a script, a style block or a URL needs different escaping, so treat this as a tool for content, not a security filter.

Questions people ask

What is an HTML entity?

An entity is a short code that stands for a character, written between an ampersand and a semicolon, such as &amp; for & or &pound; for £. Browsers display the character. Entities let you include characters that would otherwise be read as HTML, or that the file's encoding cannot hold.

Why does my email show &amp;amp; instead of &?

The text has been encoded twice: an & became &amp;, then that & was encoded again. It usually happens when encoded text is pasted into a field that encodes again on save. Decode once here to get back to the original, then paste plain text into fields that handle encoding themselves.

Do I need to encode the pound sign?

Not if the page or email is saved and sent as UTF-8, which is the default almost everywhere today. If a £ turns into odd characters such as £, the problem is a mismatch of encodings, and encoding it as &pound; or &#163; is a reliable workaround for that one field.

Can it decode text that mixes named and numeric entities?

Yes. Decoding handles named entities, decimal numbers such as &#163; and hexadecimal ones such as &#x2713; in the same text. Anything that is not a recognised entity is left exactly as it was, so ordinary ampersands in plain text are not damaged.

Where your data goes

Encoding and decoding run on this page as you type. Nothing you paste is sent to Map Extract or anywhere else.

Checked against the tool on

Top