RevealTheme logo

Codificador y Decodificador de Entidades HTML

Convierte caracteres especiales a entidades HTML (&, <, etc.) y viceversa. Útil para incrustar texto en HTML de forma segura.

Cómo usar esta herramienta

  1. 1

    Pick a mode with the Encode or Decode toggle at the top.

  2. 2

    Paste or type your text into the input box.

  3. 3

    Read the converted result in the output panel below, which updates as you type.

  4. 4

    Select and copy the output to use in your HTML or document.

¿Qué es el Codificador y Decodificador de Entidades HTML?

Las entidades HTML son secuencias de escape que representan caracteres con significado especial en HTML: &amp; para &, &lt; para <, etc. Si incrustas texto proporcionado por el usuario directamente en HTML sin codificarlo, creas vulnerabilidades XSS. Esta herramienta convierte texto a HTML con entidades codificadas para incrustarlo de forma segura, o decodifica HTML con entidades de vuelta a texto plano.

Casos de uso comunes

  • Pasting a code snippet into a blog post or docs so tags like <div> display literally instead of rendering.

  • Escaping user-supplied text before dropping it into an HTML template to avoid breaking the markup.

  • Decoding entity-laden strings copied from page source, RSS feeds, or scraped HTML back into readable text.

  • Turning a stray &amp;nbsp; or &amp;mdash; from a CMS export back into a normal space or em dash.

  • Preparing example strings for tutorials where you need to show the raw entity form of a character.

  • Quickly checking what &#39; or &#x2014; decodes to without writing throwaway code.

Preguntas frecuentes

¿Qué caracteres debo codificar?
Como mínimo: < > & " '. Tienen significado especial en HTML y pueden romper el análisis o crear XSS.
¿Debo codificar todas las entidades o solo las inseguras?
Para páginas UTF-8 modernas, codifica solo las inseguras (&, <, >, ", '). Codificarlo todo infla el HTML.

Herramientas relacionadas