T

Text Machine

Powerful text tools, in your browser

HTML Entity Encoder/Decoder

This tool allows you to convert text with special characters to HTML entities and vice versa. HTML entities help display special characters correctly on web pages.

Mode

Text to Encode
Characters like <, >, &, " and ' will be converted to HTML entities
Encoded HTML
Common HTML Entities

<

&lt;

Less than sign

>

&gt;

Greater than sign

&

&amp;

Ampersand

"

&quot;

Double quotation mark

'

&#39;

Single quotation mark

©

&copy;

Copyright symbol

®

&reg;

Registered trademark

How to use HTML Entity Encoder/Decoder

  1. 1

    Enter your text

    Paste the text or HTML snippet you want to convert into the input box.

  2. 2

    Choose encode or decode

    Click Encode to turn special characters into HTML entities, or Decode to turn entities back into characters.

  3. 3

    Get the result

    The converted output appears instantly in the result panel.

  4. 4

    Copy the output

    Use Copy Result to grab the encoded or decoded text for your project.

Frequently asked questions

What are HTML entities and why use them?
HTML entities are codes that represent reserved characters in HTML, like &lt; for < and &gt; for >. Using them lets you display these characters as text instead of having the browser interpret them as markup.
Which characters does the encoder convert?
It converts HTML-reserved and special characters such as the less-than sign (<), greater-than sign (>), and ampersand (&) into their named entity equivalents so they render safely on a page.
Can I convert entities back into normal characters?
Yes. Switch to Decode mode and paste text containing entities like &amp; or &lt;, and the tool returns the original readable characters.
Is this useful for preventing broken HTML or XSS?
Encoding user-supplied text into entities helps stop special characters from breaking your HTML structure and is a common step when safely displaying untrusted content on a page.
Does my text get sent to a server?
No. Encoding and decoding happen entirely in your browser, so your text stays on your device, and the tool is free to use without signing up.

Related tools

Keep going with these handy tools

Meta Tag Generator

Robots.txt Generator

Open Graph Previewer

HTTP Header Viewer

URL Redirect Chain Checker

Sitemap URL Extractor