Developer Tools

HTML Encoder

Escape HTML special characters into their entity equivalents — safely embed strings inside markup.

Output
Output will appear here…

About the HTML Encoder

Inserting user input or code samples into a page without escaping is both a rendering bug and an XSS vector — < opens a tag whether you meant it to or not.

This encoder converts special characters into their HTML entity equivalents so text displays literally.

How to use the HTML Encoder

  1. Paste the text or markup you want displayed as literal characters.
  2. Copy the encoded output with entities substituted.
  3. Paste it into your HTML where the literal text should appear.
  4. Render the page and confirm the characters display rather than being interpreted.

Frequently asked questions