RevealTheme logo

HTML-Entity-Codierer und -Decodierer

Wandeln Sie Sonderzeichen in HTML-Entities (&, < usw.) und zurück um. Nützlich, um Text sicher in HTML einzubetten.

So verwenden Sie dieses Tool

  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.

Was ist der HTML-Entity-Codierer und -Decodierer?

HTML-Entities sind Escape-Sequenzen, die Zeichen mit besonderer Bedeutung in HTML darstellen: &amp; für &, &lt; für < usw. Wenn Sie vom Nutzer bereitgestellten Text unverändert ohne Codierung in HTML einbetten, schaffen Sie XSS-Schwachstellen. Dieses Tool wandelt Text in HTML mit codierten Entities um, damit Sie ihn sicher einbetten können, oder decodiert HTML mit Entities wieder in Klartext.

Häufige Anwendungsfälle

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

Häufig gestellte Fragen

Welche Zeichen sollte ich codieren?
Mindestens: < > & " '. Sie haben in HTML eine besondere Bedeutung und können das Parsing stören oder XSS verursachen.
Sollte ich alle Entities codieren oder nur die unsicheren?
Für moderne UTF-8-Seiten codieren Sie nur die unsicheren (&, <, >, ", '). Alles zu codieren bläht das HTML auf.

Verwandte Tools