How to encode or decode HTML entities
- Choose Encode to turn characters into entities, or Decode to turn entities back into text.
- Paste your text. When encoding, pick how much to encode: only the unsafe characters, every non-ASCII character, or everything.
- Pick the entity style (named, decimal, or hex), then copy or download the result.
- To look up a single character, search the reference table and press the copy button on its row.
Use "Only & < > " '" when you just need to display code or user text safely inside HTML. Use "Non-ASCII too" for email templates and systems that mangle accented letters and emoji. Line breaks and tabs are always left as they are.
Questions
Is my text uploaded?
No. Encoding runs as plain JavaScript in your browser. Decoding loads a small entity table the first time you use it, and your text still never leaves the page.
Which characters must be encoded in HTML?
Always &, <, and >. Inside attribute values also encode the quote you use around the value, " or '. Everything else can stay as UTF-8 if your page is served with <meta charset="utf-8">.
Named, decimal, or hex: which should I use?
They render identically. Named entities such as © are easiest to read, but only about 250 characters have a classic name. Decimal (©) and hex (©) work for every Unicode character. The tool falls back to decimal when a character has no name.
Why does show as a different symbol in the table?
Invisible characters such as the non-breaking space, en space, and zero-width joiner are shown as a visible placeholder so you can see the row. The copy button still copies the real entity.
Credits
Built on entities (BSD-2-Clause). OneTooling is not affiliated with that project.