& Décodeur d'Entités HTML — Décoder HTML en Ligne

Decode HTML entities like & < > back to readable text. Also encode text to named, decimal, or hex entities. 100% browser-based.

Paste HTML-encoded text like <div> and click Decode to get back readable <div>. Or switch to Encode mode to convert special characters to safe HTML entities before inserting user content into your HTML pages to prevent XSS.

Input
Output

How to Use

1

Paste your text

Paste HTML, code, or any text containing characters you want to encode or entity codes you want to decode.

2

Choose mode

Select Encode (text → entities) or Decode (entities → text). Toggle "Non-ASCII only" for partial encoding.

3

Copy the result

The output updates instantly. Click Copy to clipboard to use in your project.

Frequently Asked Questions

What are HTML entities? +
HTML entities are codes used to represent characters that have special meaning in HTML, or characters that are difficult to type. For example, < becomes &lt;, > becomes &gt;, & becomes &amp;, and © becomes &copy;. They prevent browsers from misinterpreting content as markup.
What is the difference between named and numeric entities? +
Named entities use descriptive names (&amp;, &copy;, &reg;). Numeric decimal entities use the character's Unicode code point (&amp;#38; for &). Numeric hex entities use the hex form (&#x26;). All three represent the same characters; named is most readable, numeric works for any character.
What does "encode only non-ASCII" mean? +
When enabled, only characters outside the standard ASCII range (above code point 127) are encoded. ASCII-safe HTML characters like < > & are left as-is. Useful when you want to safely include international text in HTML without encoding every character.
When should I encode HTML entities? +
Always encode user-generated content before inserting it into HTML to prevent XSS attacks. Encode characters in HTML attributes, especially those that accept URLs. Encode < > & " in any text that will be rendered inside HTML tags.
Is my text sent to a server? +
No. All encoding and decoding runs entirely in your browser using JavaScript. Your text never leaves your device.


Guide : Encodeur/Décodeur d'Entités HTML

Qu'est-ce que c'est ?

L'outil d'Entités HTML convertit les caractères spéciaux en entités HTML sûres (&&amp;, <&lt;) et vice versa.

L'encodage correct des entités est essentiel pour prévenir les attaques XSS et afficher correctement les caractères spéciaux dans le HTML.

Comment utiliser

  1. Collez votre texte dans le champ d'entrée.
  2. Cliquez sur Encode pour convertir en entités HTML.
  3. Ou cliquez sur Decode pour convertir les entités en texte brut.
  4. Copiez le résultat.

Conseils professionnels

🧰 50+ Tools