Displaying Code Snippets Online
Safely show raw HTML, JSX, and Vue templates inside <pre><code> documentation blocks without browser rendering conflicts.
Safely encode reserved HTML characters into named and numeric entities, or decode HTML entities back into readable plain text.
Guide · Developer
Master character references in HTML5, safely render code blocks, and defend against injection attacks.
Encode or decode HTML entities and special characters for markup, templates, debugging and developer workflows.
Toggle between Encode and Decode, and select Basic (5 critical characters) or Extensive (all non-ASCII glyphs).
Paste user input strings, code snippets, or pick from our sample payloads.
Inspect the encoded or decoded string in the live viewer and copy with one click.
Safely show raw HTML, JSX, and Vue templates inside <pre><code> documentation blocks without browser rendering conflicts.
Sanitize user comments and profile bios before storing in databases or reflecting on public web pages.
Ensure copyright symbols, em-dashes, and currency symbols render reliably on legacy mail clients and older browsers.
HTML entities are coded character sequences (like & for '&' or < for '<') used in place of reserved markup characters. They ensure the web browser displays the character literally as text rather than parsing it as HTML markup or executable JavaScript.
XSS occurs when malicious user input containing <script> or event handlers is injected directly into a webpage's DOM. Converting < into < and > into > forces browsers to render the tags safely as harmless text strings.
Named entities use mnemonic strings (e.g. © for © or € for €), while numeric entities use decimal (©) or hexadecimal (©) Unicode code points. Numeric entities are universally valid across all XML/HTML5 parsers.
Guide · Developer
represent HTML-sensitive characters as entities or decode them back into text. makes escaped HTML text easier to inspect and transform
Encode or decode HTML entities and special characters for markup, templates, debugging and developer workflows.
Enter the text or encoded value.
Choose encode or decode.
Run the transformation.
Copy the result into the appropriate markup or debugging context.
Encode < and & when they need to appear as literal text in HTML.
Decode entity-encoded content while inspecting generated markup.
Characters such as < and & have special meaning in HTML and may need to be represented as text instead of markup.
No. It is a reversible text representation.
No. Web security requires context-appropriate output encoding and safe input handling; an encoding utility is not a complete security control.