Common HTML Entities
Click any entity to copy it
HTML Encoder encodes and decodes HTML entities online for free. Convert special characters to HTML entities.
Written & reviewed by Helperzy Editorial Team · Updated July 2026
Common HTML Entities
Click any entity to copy it
Drop in the text or markup that contains angle brackets, ampersands or quotes. It can be a code sample you want to display or a user-submitted value you need to make safe.
Click Encode to replace each special character with its entity, or Decode to turn entities back into raw characters. The ampersand is handled first so nothing gets double-encoded.
Copy the output into your page, template or database. Use this for HTML contexts only; a value heading into a URL needs percent-encoding instead.
Five characters cause almost all HTML trouble: the less-than sign, the greater-than sign, the ampersand, the double quote and the apostrophe. A browser reads them as instructions rather than content, so a less-than sign starts a tag and an ampersand starts an entity reference. Encoding replaces each one with its safe equivalent, turning the less-than sign into the entity lt, the greater-than sign into gt, the ampersand into amp, the double quote into quot and the apostrophe into the numeric form 39. Decoding walks it back. Developers displaying code samples, anyone handling user-submitted text, and people cleaning scraped or email-template content all need one direction or the other several times a week. The rule is order-sensitive, and that detail catches people out. Encoding must replace the ampersand first, then the angle brackets and quotes, because if you convert the less-than sign to the entity lt before handling ampersands, the ampersand you just introduced gets encoded again and you end up with amp;lt; instead of lt;. That double-encoded output is the classic symptom of a naive implementation and shows up on live sites as visible entity text on the page. Decoding runs in the reverse order for the same reason. Beyond the five core characters, HTML supports named entities such as copy for the copyright symbol and nbsp for a non-breaking space, plus numeric entities that reference any Unicode code point directly, and both forms produce identical output in the browser. Take the string a developer wants to show in a tutorial: an anchor tag whose href is a hash, whose class attribute is btn, with the words Click me between the tags. Pasted raw into a page, the browser creates an actual clickable link and the reader sees only the words Click me rather than the code. Encoded, every angle bracket becomes lt or gt and each double quote becomes quot, so the page displays the tag source exactly as typed. Now try the reverse with something dangerous: a script tag containing an alert call. Encoded, it renders as harmless visible text on the page. Decoded and inserted into the document, it executes. Same characters, completely different outcome, which is the whole point of the exercise. Where this matters in practice. A documentation author encodes every markup example so the published docs show tags as text rather than rendering them into real elements. A backend developer encodes a user-supplied display name before writing it into a profile page, which closes the most common cross-site scripting hole in the application. A support engineer decodes an email template full of entities to read what the message actually says before editing it. Someone importing scraped product descriptions decodes the entities once so the database holds clean readable text and the display layer handles escaping instead. A QA tester pastes a suspicious payload here to see exactly which characters a form is failing to escape. The pitfall worth stating plainly: encoding is context-specific and people mix contexts up. HTML encoding is correct for text going into a page body or an attribute. It is wrong for a value going into a URL, where you need percent-encoding, and wrong for a value going into a JavaScript string literal, where quotes and backslashes need escaping instead. Applying HTML encoding to a query parameter produces a broken link, not a secure one. Also remember that decoding untrusted content and then inserting it into a page undoes your protection entirely, so decode only when you need plain text for reading or storage. Encoding is one layer, not a whole security strategy; pair it with validation and a content security policy. All processing runs in your browser and nothing is uploaded.
Input
<a href="#" class="btn">Click me</a>
Result
<a href="#" class="btn">Click me</a>
Each angle bracket becomes lt or gt and each double quote becomes quot, so the browser prints the tag as visible text instead of creating a real link.
Input
Tom & Jerry <script>alert(1)</script>
Result
Tom & Jerry <script>alert(1)</script>
The ampersand is encoded before the brackets, avoiding the double-encoded amp;lt; result, and the neutralised script tag renders as text rather than executing.
Paste your text into Helperzy HTML Encoder and click Encode. All special characters such as <, >, &, and quotes are converted to their HTML entity equivalents like <, >, and &. There is no signup and nothing is uploaded — encoding runs in your browser. Click Decode to reverse the process and turn entities back into normal readable characters.
UUID Generator creates random UUIDs (v4) and GUIDs online for free. Generate unique identifiers instantly for databases, APIs, and development. No signup needed.
Image to Base64 Converter encodes any image into a Base64 data URI online for free. Get ready-to-use CSS and HTML code in your browser.
JSON to YAML Converter changes JSON into clean YAML instantly online for free. Validate and convert config data in your browser with no upload.
Cron Expression Generator builds and explains cron schedules online for free. Create cron expressions with a plain-English description in your browser.
Image Resizer changes image dimensions online — set exact pixels, use percentage scaling, or pick from 12 presets (Instagram, Passport, YouTube, etc.). Target specific file sizes like 50KB or 100KB. Batch resize multiple images. 100% free, browser-based.
Image Converter changes images between any format online free — JPG, PNG, WebP, AVIF, PDF, ICO, BMP, HEIC, GIF, SVG. Batch conversion, resize, rotate, flip, AI format recommendation. 100% browser-based, no upload.
Convert JPG to WebP format online free — reduce image file size by 25-35% with identical visual quality. Batch conversion, adjustable quality, lossless mode available. Boost website speed and Core Web Vitals scores. 100% browser-based, no upload needed.
Convert PNG to WebP format online free — reduce file size by 26-34% while preserving full transparency. Batch conversion, lossless and lossy modes, adjustable quality. Boost website performance and Core Web Vitals. 100% browser-based, no upload needed.