RevealTheme logo

HTML-entiteit-encoder en -decoder

Zet speciale tekens om naar HTML-entiteiten (&, <, enz.) en omgekeerd. Handig om tekst veilig in HTML in te sluiten.

Hoe u deze tool gebruikt

  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.

Wat is de HTML-entiteit-encoder en -decoder?

HTML-entiteiten zijn escape-reeksen die tekens met een speciale betekenis in HTML weergeven: &amp; voor &, &lt; voor <, enz. Als u door de gebruiker opgegeven tekst rechtstreeks in HTML insluit zonder die te coderen, creëert u XSS-kwetsbaarheden. Deze tool zet tekst om naar HTML met gecodeerde entiteiten om die veilig in te sluiten, of decodeert HTML met entiteiten terug naar platte tekst.

Veelvoorkomende toepassingen

  • 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.

Veelgestelde vragen

Welke tekens moet ik coderen?
Minimaal: < > & " '. Deze hebben een speciale betekenis in HTML en kunnen de analyse verstoren of XSS veroorzaken.
Moet ik alle entiteiten coderen of alleen de onveilige?
Voor moderne UTF-8-pagina's codeert u alleen de onveilige (&, <, >, ", '). Alles coderen blaast de HTML op.

Gerelateerde tools