Encoding & Transformation · free · no sign-up
HTML Encode
Convert special characters into HTML entities so they display safely on a web page.
HTML Encode
Sanitize text with HTML entities
0
0
About the HTML Encode
Convert special characters into HTML entities so they display safely on a web page.
How to use the HTML Encode
- Type or paste your text into Raw Chars.
- Press Encode Entities.
- Use Copy Result to copy the output, or download it if the button is shown.
Worked example
<p> becomes <p>.
Tips
- Encoding user input helps prevent HTML injection, but you should also escape output in your own code.
Frequently asked questions
Why encode HTML?
So that characters like < and & show as text rather than being treated as code.