Loading...
Loading...
We use cookies to enhance your experience, analyze site usage, and serve personalized content. By clicking "Accept All," you consent to our use of cookies. See our Cookie Policy and Privacy Policy for details.
Encode and decode HTML entities for web development
Common HTML Entities
Encodes and decodes HTML entities with named, numeric, and hex reference modes. Provides body and attribute content presets that follow HTML spec escaping rules, a searchable entity reference table, and quick-insert buttons for common entities like & < > " '.
Handling HTML entities manually leads to XSS vulnerabilities and rendering bugs when user-generated content contains special characters. This tool ensures proper encoding based on context (body vs attribute) and makes it easy to look up or insert any HTML entity.
Frontend developers sanitizing user input, content authors preparing HTML with special characters, and security engineers auditing XSS prevention in templates.
Type or paste text in the input area; the encoded/decoded output updates in real time
Select encoding mode: named (&), numeric (&), or hex (&) reference style
Choose a preset: Body (encodes < > &) or Attribute (encodes < > & " ') for context-appropriate escaping
Use the entity reference table to search for any Unicode character by name, code point, or entity
Click quick-insert buttons to instantly insert common entities like © or —
Use the decode mode to convert entity-encoded text back to plain characters
Input: '<script>alert(1)</script>' with body preset. Output: '<script>alert(1)</script>'Input: '© 2024 My Company' with hex mode encode. Output: '© 2024 My Company'Encode and decode Base64 strings online free
Encode and decode URLs and URL components online free
Convert images to Base64 encoded strings for embedding in HTML/CSS
Escape and unescape strings for JavaScript, JSON, HTML, URL, and more
Dive deeper with our comprehensive guides and tutorials.