HTML Entities
Encode & Decode Online
html-entities
Input
HTML EntitiesUTF-8
Ctrl+↵ encodeCtrl+⇧+D decode
Was this tool helpful?
Related Tools
Frequently Asked Questions
HTML entities are special character sequences that represent reserved or hard-to-type characters. For example, < displays the < sign and & displays &. The browser replaces each entity with the corresponding character when rendering the page.
HTML entities are needed when inserting characters into HTML that could be interpreted as markup: angle brackets, ampersands, and quotes. They are also useful for entering characters not available on the keyboard, such as currency signs or mathematical symbols.
Encoding user input into HTML entities prevents malicious scripts from executing. If an attacker inserts a <script> tag, it gets encoded as <script> and is displayed as text rather than executed.
The five essential entities are < (<), > (>), & (&), " ("), and ' ('). Other commonly used ones include (non-breaking space), — (em dash), © (copyright), and € (euro sign).