HTML escape tool
HTML escape text by turning <, >, &, and quotes into HTML entities, so they show as text instead of markup. Runs in your browser, no upload.
How to escape HTML
Paste text or markup into the input pane and click Convert. The five characters that mean something in HTML are replaced with entities: & becomes &, < becomes <, > becomes >, a double quote becomes " and a single quote becomes '. Everything else is left as it is. Copy the result into your page, where it shows as plain text.
Why escape HTML
Showing user input or code samples without escaping can break your layout or open the door to injection attacks. Escaping shows the raw characters safely.
Good for code samples
Escape a snippet before you paste it into a page. The tags then show up as text instead of being read by the browser.
A quick example
To show the code <a href="/">Home</a> on a page instead of a link, escape it first. It becomes <a href="/">Home</a>, which the browser displays as the original text. Put it inside a pre or code element to keep the formatting.
Before you start
Input: TXT and HTML. Output: Escaped HTML. The settings appear before anything runs, so you can check them first. Your original file is never changed.
The value you enter is processed in your browser. Still test the output where it will be used. Clean formatting does not prove the data is safe or correct.
Keep the original until you have opened and checked the result. The work happens in this browser tab, so the size you can handle depends on your device's memory, your browser and the file itself.
How to use the HTML escape tool
- Paste the text or markup you want to escape.
- Click Convert to get the escaped output.
- Copy it into your HTML, where it will show as plain text.
Last updated · How we build and check tools · Report an error