About HTML Entity Encoder
The HTML Entity Encoder is a free html entity encoder that converts special characters — <, >, &, quotes — into their HTML entity equivalents, and decodes entities back to plain text. It's the tool to reach for any time you need to escape html safely, whether you're a developer, technical writer or anyone pasting code or foreign text into a web page.
Encoding matters whenever text could be mistaken for markup: showing a code snippet inside a blog post, rendering user-submitted comments without letting them break your layout (or worse, inject a script), or writing documentation that literally contains characters like < and &. Skip the encoding step and a browser will try to parse your text as HTML — the classic symptom is a webpage where part of the content mysteriously disappears because it was interpreted as a tag. The decode direction is just as useful: pasted content from CMSs, RSS feeds or old databases often arrives full of entities like & and ' that need to become normal text again. It's also a common step when preparing text for RSS feeds, email templates and legacy CMS platforms that store content in an ASCII-safe, entity-encoded form rather than raw UTF-8.
The decoder understands all three entity forms: named entities (&, ©, — and dozens more from the HTML spec), decimal numeric references (é), and hexadecimal numeric references (é) — so it doesn't matter which form your source data used. An optional numeric-encoding mode escapes every non-ASCII character, not just the five HTML-critical ones, which is useful for systems that mangle raw UTF-8 or older email templates that only support ASCII. Common named entities like (non-breaking space), ™ and € are recognized alongside the handful most developers already know, so pasted content from word processors and design tools decodes cleanly instead of leaving mystery entity codes behind.
Conversion is instant and entirely client-side.
How to Use the HTML Entity Encoder
- Choose Encode or Decode mode.
- Paste your text or entity-encoded HTML.
- Copy the converted result.
Features
- Encodes the five HTML-critical characters (& < > " ')
- Optional numeric encoding of all non-ASCII characters
- Decodes named, decimal and hex entities
- Instant, client-side conversion
Examples
Encoding a code snippet for safe display
Input
<div class="box">Tom & Jerry</div>
Output
<div class="box">Tom & Jerry</div>
Decoding entities from a CMS export
Input
Café & Bar — est. 1990
Output
Café & Bar — est. 1990
Frequently Asked Questions
When do I need HTML entities?
Whenever text could be interpreted as markup: showing code snippets on a page, inserting user content into HTML, or writing characters like < and & in documentation. Encoding prevents broken layouts and XSS injection.
What's the difference between é and é?
Both represent é. é uses the decimal code point; é uses hexadecimal. Browsers accept either form.
Does this tool decode HTML entities too?
Yes — switch to Decode mode and paste text containing named (&), decimal (é) or hexadecimal (é) entities; all three forms convert back to plain text in one pass.
Is the HTML Entity Encoder free?
Yes, the HTML Entity Encoder is completely free with no usage limits. No signup, no account and no installation required.
Is my data safe?
Yes. All processing happens locally in your browser using JavaScript — nothing you type is uploaded or stored on our servers.
Related Tools
URL Encode/Decode
Encode or decode URLs and query strings online. Free URL encoder/decoder for percent-encoding special characters.
Base64 Encode/Decode
Encode text to Base64 or decode Base64 to text instantly. Free online Base64 converter — no upload, everything stays in your browser.
HTML to Markdown
Convert HTML to clean Markdown — headings, lists, links, images and code blocks. Free client-side HTML to Markdown converter.
Markdown Preview
Write Markdown and see the rendered result live — headings, lists, links, code blocks and more. Free online Markdown previewer.
CSS Minifier & Beautifier
Minify CSS to shrink file size or beautify it into readable, indented code. Free online CSS formatter — instant and client-side.
HTML Formatter / Minifier
Beautify HTML into readable, indented markup or minify it to shrink file size. Free online HTML formatter, no upload required.
String Escape / Unescape
Escape or unescape strings for JavaScript, JSON, HTML, SQL or CSV contexts. Free online string escaping tool, runs in your browser.
Binary to Text Converter
Convert text to binary code or decode binary back to readable text, byte by byte. Free online binary to text converter and text to binary translator.