Encode and decode HTML entities — convert &, <, >, quotes and special characters
HTML uses angle brackets, ampersands, and quotation marks as syntax characters that structure markup. When these characters appear in page text content without encoding, browsers may misinterpret them as HTML tags or attribute delimiters, breaking the page layout or creating cross-site scripting (XSS) security vulnerabilities. HTML entity encoding converts each special character to its safe named or numeric entity equivalent: ampersand becomes &, less-than becomes <, and greater-than becomes >. This tool encodes any text to safely displayable HTML entities for insertion into HTML pages, and decodes encoded strings back to readable characters for debugging entity-encoded content. A common use case is embedding code snippets into web pages or blog posts. A developer writing a tutorial about JavaScript arrow functions needs to display the characters < and > literally on screen, and without proper encoding those characters would be swallowed by the browser as tag delimiters. Pasting the snippet here produces the correctly encoded version ready to drop into a pre or code element. Another frequent scenario is handling user-generated content in a CMS or comment system: before storing or rendering a submitted review that contains an ampersand in a product name like "Nuts & Bolts Hardware," the raw string must be encoded so it does not corrupt surrounding markup. A third situation is troubleshooting API or database payloads that arrive with entity sequences already applied — decoding mode instantly translates strings like ' or " back to readable apostrophes and quotation marks, saving time spent parsing them manually. Front-end developers, back-end engineers sanitizing template output, and technical content writers preparing documentation all reach for this tool regularly. All encoding and decoding runs entirely in your browser — no text is sent to any server — so sensitive source code, proprietary content, or personal data never leaves your machine.
Encode and decode — Convert special characters to HTML entities and back in both directions.
Named and numeric entities — Choose human-readable named entities (&, ©) or numeric entities (&, ©).
Paste and go — Paste text with special characters and see the encoded output immediately.
Safe for HTML — Encoded output is safe to embed in HTML attributes, text nodes, and JSON strings.