Monu Tools

HTML-entiteettikoodain / dekoodain

Koodaa teksti HTML-entiteeteiksi tai pura entiteetit takaisin tekstiksi, UTF-8-turvallisesti ja selainpuolella.

Nain kaytat tyokalua HTML-koodain

  1. 01

    Liita tekstisi tai HTML:si.

  2. 02

    Valitse Koodaa (suojaa HTML-erikoismerkit), Koodaa kaikki (suojaa myos ei-ASCII) tai Pura.

  3. 03

    Kopioi tulos.

What it does

An HTML entity encoder and decoder for escaping special characters so they display as text instead of being interpreted as markup. It converts characters like < and & into entities such as &lt; and &amp;, and decodes them back again.

Encoding and decoding are UTF-8 safe and run entirely in your browser, so nothing you paste is uploaded.

How encoding works

Encoding always escapes the five characters that have special meaning in HTML: & < > " and '. That is what stops a stray < from being read as the start of a tag, or text from accidentally breaking out of an attribute.

An Encode all option additionally turns every non-ASCII character into a numeric entity, which is useful for legacy systems, some email pipelines, or anywhere you need to be sure the output is pure ASCII.

What decoding understands

Decoding understands all three entity forms: named entities like &amp; and &copy;, decimal entities like &#233;, and hexadecimal entities like &#x20AC;. Sequences it does not recognize are left untouched rather than mangled.

Encoding and XSS

Escaping the HTML specials is the core defense against HTML injection and cross-site scripting (XSS): any untrusted text should be encoded before it is placed into a page, so it renders as harmless characters instead of active markup.

Usein kysytyt kysymykset

Mika ero on Koodaa- ja Koodaa kaikki -toiminnoilla?

Koodaa suojaa vain viisi merkkia, jotka tulee suojata HTML:ssa (& < > " '). Koodaa kaikki muuttaa lisaksi jokaisen ei-ASCII-merkin numeeriseksi entiteetiksi, mika on hyodyllista vanhoille jarjestelmille tai sahkopostille.

Mitka entiteetit se voi purkaa?

Nimetyt entiteetit kuten &amp; ja &copy;, desimaalientiteetit kuten &#233;, ja heksadesimaalientiteetit kuten &#x20AC;. Tuntemattomat jaksot jatetaan ennalleen.

Estaako se XSS:n?

HTML-erikoismerkkien koodaaminen on ydinpuolustus merkinnan injektointia vastaan. Koodaa aina epaluotettava teksti ennen sen sijoittamista HTML:aan.

Lähteet

Upota tämä työkalu

Lisää tämä työkalu omalle verkkosivustollesi. Kopioi alla oleva koodinpätkä, niin se pysyy ajan tasalla automaattisesti.

<iframe src="https://monu.tools/embed/fi/html-encoder" width="100%" height="640" style="border:1px solid #e5e5e5;border-radius:12px;max-width:680px" loading="lazy" title="Monu Tools"></iframe>

Liittyvat tyokalut