Escape HTML
Type or paste text to escape characters like < > & into HTML entities, so code shows as text instead of rendering.
Input
LocalOutput
—About Escape HTML
Escape HTML converts characters like <, >, and & into their entity equivalents so code or markup displays as visible text instead of rendering. It is for writers documenting code and developers preventing markup from being interpreted.
Showing literal HTML on a page requires escaping, or the browser renders it. Escaping locally produces safe, displayable text without a server step.
Step by step
- Type or paste the text or code you want to display literally.
- The tool converts <, >, &, and quotes into HTML entities.
- The escaped output updates as you type.
- Copy it into your page or documentation so the code shows as text.
What it offers
- Escapes angle brackets and ampersands
- HTML-entity output
- Safe code display
- Runs on your device
Tips for best results
- Escape user-supplied content before placing it in HTML to avoid injection.
- Escaping is for display; it is not a substitute for proper output encoding in your framework.
- Pair with Unescape HTML to confirm the original text is recoverable.
Why people use it
Safe display
Markup shows as text instead of rendering.
Covers key characters
Escapes the characters that browsers would otherwise interpret.
Live
Escaped output appears as you type.
Local
Your content stays in the browser.
Common questions
This runs entirely in your browser
No file or text you enter here is uploaded. Encoding and decoding happen on your device using native browser APIs — close the tab and nothing remains on a server.