HTML Entities Converter turns text into HTML entities. Type or paste your text, click the button and copy the result. It is free and runs in your browser.
<title>This is a test title & code</title>
<title>This is a test title & code</title>
Bookmark: press Ctrl+D (Windows) or Cmd+D (Mac) to save this tool.
This tool converts text into HTML entities. An HTML entity starts with an ampersand and ends with a semicolon, such as < for the less-than sign. Entities let you show characters like < and & on a web page without the browser treating them as code.
Type or paste your text and click the button. The characters &, < and > are always converted, and quotes are converted by default. By default spaces become , which keeps them from collapsing, and you can turn that off. You can also convert accents, symbols and emoji to numeric entities such as é.
Line breaks are left as they are. The converted text can be pasted straight into your HTML.
Unless an option is named, spaces and quotes are converted, and accents, symbols and emoji are left as they are.
| Setting | Before | After |
|---|---|---|
| Sentence with tags | <title>This is a test title & code</title> | <title>This is a test title & code</title> |
| Tags | <p>Hello</p> | <p>Hello</p> |
| Ampersand | Tom & Jerry | Tom & Jerry |
| Spaces kept as spaces | Tom & Jerry | Tom & Jerry |
| Double quotes | <a href="x"> | <a href="x"> |
| Apostrophe | It's | It's |
| Quotes off | say "hi" | say "hi" |
| Accents, numeric | café | café |
| Emoji, numeric | Hi 👋 | Hi 👋 |
Showing HTML code, tags and special characters on a web page, blog post or tutorial so they appear as text and are not run as code, and for keeping characters safe inside HTML attributes.
Changing spaces to stops the browser from collapsing them, but it also stops lines from wrapping at those spaces. Untick that option if you only need to protect the code characters.
To encode a web address, try Url Encode. To turn text into Base64, try Base64 Encoder. To see character codes as numbers, try String to Decimal.
It converts text into HTML entities, so special characters such as < and & can be shown on a web page as text instead of being read as code.
Type or paste your text into the box and click Convert to Entities. The result appears in the same box, and you can copy it with the Copy button.
It is a code that starts with an ampersand and ends with a semicolon, such as < for the less-than sign or & for an ampersand. Browsers show the character instead of the code.
The characters &, < and > are always converted. Quotes are converted by default, spaces can be changed to , and accents, symbols and emoji can be changed to numeric entities.
A browser collapses several spaces into one, and stops that. It is ticked by default, and you can untick it to keep ordinary spaces.
Double quotes become " and single quotes become '. This keeps text safe when it is placed inside an HTML attribute, such as a title or alt value.
Only if your page cannot use UTF-8 or you want plain ASCII output. For example, é becomes é and a waving hand becomes 👋.
No, this tool only converts text to entities.
The tool is free, needs no account and runs in your browser, so your text is not uploaded to a server.
Last updated: 17 November 2026