HTML Entities
Encode and decode HTML entities.
Common HTML Entities Reference
&-&Ampersand
<-<Less than
>->Greater than
"-"Double quote
'-'Single quote
-(space)Non-breaking space
©-©Copyright
®-®Registered
™-™Trademark
—-—Em dash
–-–En dash
…-…Ellipsis
This tool converts text into HTML entities and back. When encoding, reserved characters like & < > " and ' become named entities such as & and <, while any character above ASCII (accents, Korean, Japanese, emoji) is turned into a numeric reference like ☃. Decoding reverses the process and restores the original characters.
It solves the problem of displaying code or special symbols safely inside a web page. If you paste raw <div> into HTML it becomes a tag instead of text, and an unescaped & can break the page. Use this when writing documentation, embedding code samples, storing user text, or debugging entities that show up in scraped HTML or RSS feeds.
How to use
- Paste plain text or HTML into the Input box, for example a code snippet like <div class="hello">.
- Click Encode to replace special and non-ASCII characters with their HTML entities, or click Decode to turn entities back into normal characters.
- Read the result in the Output box and use the Copy button to send it to your clipboard.
- Use Swap Output to Input to chain operations, and check the Common HTML Entities reference table below for the most-used named entities.
FAQ
- Which characters get encoded as named entities versus numeric codes?
- Common reserved characters use named entities: & becomes &, < becomes <, > becomes >, " becomes ", and ' becomes '. Punctuation like the em dash, ellipsis, and copyright symbol also map to readable names. Any other character above ASCII (code point over 127) is encoded as a decimal numeric reference such as あ, which every browser understands.
- Does decoding support hexadecimal and numeric entities I did not create here?
- Yes. Decoding uses the browser's own HTML parser, so it resolves named entities (©), decimal references (©), and hexadecimal references (©) alike, even ones produced by other tools.
- Why are normal letters and numbers left unchanged when I encode?
- Plain ASCII letters, digits, and most basic punctuation are already safe inside HTML, so only reserved characters and non-ASCII characters are escaped. This keeps the output readable instead of bloating it with unnecessary entities.
- Is my text sent anywhere?
- No. Encoding and decoding run entirely in your browser with built-in JavaScript, so nothing is uploaded. You can safely process private content, internal docs, or pasted source code.