HTML Entity Encoder / Decoder
Encode special characters to HTML entities or decode them back.
Convert special characters to HTML entities (encoding) and HTML entities back to characters (decoding). Essential for safely displaying user-generated content in HTML, preventing XSS vulnerabilities, and working with legacy HTML.
Features
Use Cases: When This Tool Helps
-
Show code examples on a web page
Encode < and > so HTML snippets display as text in blog posts and tutorials instead of rendering.
Read the guide → -
Fix &-style text in exports
Decode entities that appear as & or ' in CSV exports, emails, or RSS feeds.
-
Prevent broken pages and XSS
Encode user-supplied text before inserting it into HTML templates.
-
Insert special symbols safely
Get the entity for ©, ™, €, or non-breaking spaces for HTML emails.
-
Clean scraped content
Decode entities in text pulled from websites before analysis or reuse.
-
Debug CMS and email output
Understand why a product title shows strange codes instead of quotes or apostrophes.
How to Use
- Choose Encode or Decode mode.
- Paste your text or HTML.
- Copy the converted output.
FAQ
Why encode HTML entities?▾
To prevent browsers from interpreting special characters as HTML markup. For example, displaying '<script>' as literal text requires encoding it as '<script>'.
What is ?▾
is the HTML entity for a non-breaking space — a space that won't collapse or break a line.
Common HTML Entities
- & → &
- < → <
- > → >
- " → "
- ' → '
- (non-breaking) →