HTML Entity Encoder
Turn characters such as < > & and accents into HTML entities, or decode named and numeric entities back into plain text.
HTML Entity Encoder escapes characters such as <, >, & and quotes as HTML entities so they show as text instead of markup, and decodes named and numeric entities back. It can also escape every non-ASCII character.
What are HTML entities?
HTML entity
A code that stands for a character in HTML. Named entities look like © and numeric ones like © or ©. They let you show characters that would otherwise be read as markup, or that are hard to type.
Why use HTML Entity Encoder?
- Show code on a page. Escape a snippet of HTML so readers see the tags instead of the browser running them.
- Decode everything. Decoding understands all of the more than two thousand named entities in HTML5, plus decimal and hex codes.
- ASCII-only output. Escape every accented letter and symbol when a system only accepts plain ASCII.
How to use HTML Entity Encoder, step by step

- Paste your text into HTML Entity Encoder. HTML, plain text or text full of entities.
- Choose encode or decode. For encoding, choose which characters to escape and whether to prefer named, decimal or hex entities.
- Copy the result. It updates as you type.
Frequently asked questions
Does escaping make user input safe?
Escaping < > & and quotes is the core of preventing HTML injection in text content. Attributes, URLs and scripts need their own rules, so use your framework's escaping in real code.
Is decoding safe with untrusted HTML?
Yes. Decoding reads the text as plain text, so tags stay as text and no script can run.
Which named entities does encoding use?
Common ones such as &, ©, € and . For anything else it falls back to a numeric code, which every browser understands.
Looking for the long version? The guides cover each of these jobs in depth.