HTML Entities Encoder
Encode text to HTML entities and decode entities back to text. Converts angle brackets, ampersands, quotes, and other special characters to safe equivalents for use in HTML templates and CMS workflows.
How to use the html entities encoder
Paste raw HTML on the left to encode special characters; paste encoded text on the right to decode entities back.
Formula & explanation
Encoding: replace & < > " ' with named or numeric entities. Decoding: leverage the browser's HTML parser via a textarea element.
Examples
"<div>" → "<div>". "&" → "&".
Frequently asked questions
- Which characters get encoded?
- The five characters that are special in HTML: & < > " and ' — encoded as & < > " and ' respectively.
- When do I need to encode HTML entities?
- Any time you display user-supplied text inside HTML, or when you want to show literal HTML tags as visible text rather than rendered markup.
- Does encoding handle Unicode characters?
- This tool only encodes the five core HTML special characters. Unicode code points above ASCII are left as-is, which is fine for UTF-8 pages.
- Can I decode numeric entities like ©?
- Yes — paste encoded text in the right panel and the browser's parser resolves both named entities (©) and numeric ones (©) to their character equivalents.
Related developer tools tools
- String Escape/UnescapeEscape and unescape strings for JSON, JavaScript, HTML, and SQL. Handles special characters, backslashes, quotes, newlines, and Unicode escape sequences instantly.
- URL Encoder/DecoderPercent-encode and decode URLs and query string values. Handles full URLs or individual components — paste any URL to encode special characters or decode percent-encoded strings.
- HTML EditorWrite HTML with live preview side-by-side. Syntax-highlighted editor with formatted source view — useful for testing snippets, email templates, or quick mockups in your browser.
- Base64 Encoder/DecoderEncode text or binary data to Base64 and decode Base64 strings back to text. Supports standard and URL-safe Base64. Useful for data URIs, API tokens, and email attachments.
- JWT DecoderDecode JSON Web Tokens and inspect the header, payload, and signature. Paste any JWT to see claims, expiry, issuer, and algorithm — no secret key needed to decode.
- JSON FormatterPretty-print, minify, and validate JSON. Detects syntax errors with line numbers and supports nested structures of any depth.