HTML Entity Encode / Decode
Encode and decode HTML entities online. Escape <, >, &, quotes, and non-ASCII Unicode for safe rendering in HTML, JSX, and email — runs in your browser.
Last updated:
How to Use HTML Entity Encode / Decode
- 1Select "Encode" or "Decode" mode using the toggle.
- 2Paste your HTML or plain text into the input field.
- 3The converted result with encoded or decoded entities appears instantly.
- 4Click "Copy" to copy the result to your clipboard.
Frequently Asked Questions
What are HTML entities?
HTML entities are special sequences that represent reserved or invisible characters in HTML. For example, < represents "<" and & represents "&". They prevent the browser from interpreting characters as markup.
When should I encode HTML entities?
Encode HTML entities whenever you display user-generated content or embed special characters in HTML. This prevents cross-site scripting (XSS) attacks and ensures the content renders correctly.
Does this handle all named HTML entities?
Decoding recognises all standard named entities (like ©, —, €) plus numeric and hexadecimal character references. Encoding escapes the five reserved characters (< > & " ') and, with the Unicode option on, emits numeric references for any non-ASCII character.
Is my data sent to a server?
No. All encoding and decoding is performed locally in your browser. Your data never leaves your device.
Related Tools
HTML to Markdown Converter
Convert HTML to clean GitHub-flavored Markdown online. Handles headings, lists, links, images, code blocks, blockquotes, and tables — runs in your browser.
Markdown to HTML Converter
Convert Markdown to HTML with live preview. GitHub-flavored — tables, task lists, code fences, autolinks — with sanitized HTML output you can copy.