HTML entity encoder at decoder
I-escape ang HTML na karakter o i-decode ang limang pangunahing named entity at numeric reference.
Input
Tip: pindutin ang Ctrl + Enter para patakbuhin
Mga naka-save na settings
Sa ngayon, nasa Ingles lamang ang detalyadong tulong sa ibaba.
Tungkol sa tool na ito
To show code or user-supplied text on a web page without the browser interpreting it as HTML, special characters must be escaped as entities. This tool escapes &, <, >, double and single quotes, or decodes the five basic named entities and numeric character references back to characters.
Escaping is essential when inserting text into HTML, but it is not a complete defence against cross-site scripting in every context, such as inside script tags or URLs.
Paano ito gamitin
- Paste the text or HTML.
- Choose encode to escape it, or decode to turn entities back into characters.
- Run the tool.
- Copy the result into your page, documentation or template.
Paano gumagana ang kalkulasyon
Encoding replaces & with &, < with <, > with >, " with " and ' with '. Decoding converts those five named entities plus decimal (é) and hexadecimal (é) references.
& < > quotes ⇄ entitiesHalimbawa
To show <a href="x">Tom & Jerry</a> as text in a tutorial, encoding produces <a href="x">Tom & Jerry</a>. Decoding "<b>café ©" returns "<b>café ©": © is a named entity outside the basic five, so it is left as written.
Halimbawang input at resulta
<p> → <p>
Mga limitasyon
- Decodes only &, <, >, ", ' and numeric references.
- Does not sanitize or validate HTML.
- Up to 100,000 characters.
Huling na-update:
Mga madalas itanong
Why is © not decoded?
Only the five basic named entities are decoded. Use the numeric form © for ©.
Does escaping make user input safe?
It is safe for HTML text and quoted attribute values. Other contexts, such as JavaScript or URLs, need their own escaping.
Do I need to escape non-English letters?
Not on a UTF-8 page; they can be written directly.
Pag-aayos ng problema
Text shows &amp; on my page.
It was escaped twice. Escape only once, at the point where the text is inserted into HTML.
Named entities like remain.
They are outside the five supported names. Replace them with numeric forms or decode them in an editor.
My CMS still breaks the code sample.
Some editors decode entities on save. Use a code block feature instead.
Privacy & Libreng gamitin
Sine-save ba ang aking input?
Nananatili sa tab na ito ang iyong input. Hindi namin natatanggap ang iyong mga file, na-paste na teksto o value ng kalkulasyon.
Libre ba ang tool na ito?
Oo. Walang kailangang signup o bayad.
Tingnan din
Mga susunod na hakbang
JSON formatter at validator
I-validate, i-pretty-print o i-minify ang JSON sa iyong device. Hindi kailanman ipinapadala sa server ang invalid na data.
Developer at SEOConverter ng CSV papuntang JSON
I-convert ang CSV header at record sa JSON, kasama ang delimiter na nasa quote at line break.
Developer at SEOConverter ng JSON papuntang CSV
I-convert ang flat na array ng object sa CSV. Nilalagyan ng proteksiyong prefix ang mga string na mukhang formula para sa spreadsheet.
Developer at SEO