Herramientas HTML
HTML encoder
Try it
Encode text to numeric / named HTML entities.
Loading…
How to use this tool, examples, and related tips.
Paste the raw string you want to encode into the input field.
The tool replaces characters with special meaning in HTML — &, <, >, ", ' — with their corresponding entity references.
Copy the encoded output and embed it safely inside HTML content or attributes.
HTML encoding replaces characters that the browser would otherwise interpret as markup with entity references that render as literal text. The most critical characters are & (which begins entity references), < and > (which define tags), and " and ' (which delimit attribute values). Without encoding, these characters in user-supplied or dynamic content can break page rendering or introduce cross-site scripting (XSS) vulnerabilities. HTML encoding is a fundamental output-sanitization technique for any application that renders dynamic content in a browser.
Sanitizing user input for HTML output — Encode any user-supplied string before inserting it into an HTML template to prevent XSS.
Embedding code samples in HTML — Encode code snippets containing <, >, and & so they display correctly in a <pre> or <code> block.
Preparing content for HTML emails — HTML email clients are inconsistent; encoding special characters in content reduces rendering issues.
Writing HTML templates manually — Encode dynamic values being inserted into attribute values or text nodes in hand-written templates.
Answers about this tool and how your data is handled.
At minimum: & → &, < → <, > → >, " → ", ' → '. Some implementations also encode extended characters as numeric entities.
HTML encoding is the primary defense for inserting untrusted data into HTML text nodes and attribute values. Full XSS prevention also requires context-aware encoding — different rules apply to JavaScript contexts, URL attributes, and CSS values. Use a battle-tested templating library in production.
Yes — the terms are used interchangeably. See also the HTML escape tool.
No. Encoding runs entirely in your browser. Nothing is uploaded.
No — HTML encoding is for HTML contexts. Inside <script> tags, JavaScript encoding rules apply. Use the JavaScript escape tool for that context.
Même catégorie d’abord, puis d’autres utilitaires.
Herramientas HTML
Encode text to numeric / named HTML entities.