{ }JSONKit.tools

HTML Entity Decode

Turn &, © and — back into the characters they stand for. Named and numeric references both work, and anything unrecognised is left untouched.

Encode⇄Decode

Encoded

Text

Waiting for input…

About this tool

Entity-encoded text turns up wherever HTML has been stored as data — a database column, an RSS feed, an API that returns rendered content, a log line. Decoding restores the original characters so the text can be read or processed. Numeric references are handled in full, including astral characters like emoji; named references cover the set that occurs in real content. Anything unknown is deliberately left as written, so nothing is silently altered.

How to use it

  1. 1Paste the encoded text into the left panel.
  2. 2Read the decoded result on the right.
  3. 3If it still contains entities, it was double-encoded — decode the result once more.

Frequently asked questions

›What kinds of entity does it understand?

All numeric references — decimal © and hexadecimal © — plus the named ones that actually appear in copied text: &,  , —, ©, typographic quotes, arrows, maths symbols and Greek letters. An unrecognised name is left exactly as it was rather than guessed at.

›Why is there still a strange space in my text?

That is   decoded into a real non-breaking space (U+00A0). It looks like a normal space but does not wrap or collapse, and it is the usual culprit behind text copied out of a web page behaving oddly.

›What does & mean?

Double encoding: text that was escaped twice. Decode it a second time to get the original. It usually means two layers of a system each escaped the same string.

›Does decoding make the text safe to insert into a page?

The opposite. Decoding turns <script> back into a real tag. Read the result, but re-escape before putting it into HTML — the Encode side of this pair does that.