Developer Utility
HTML Entity Encoder / Decoder
Encode HTML special characters into entity codes or decode entity strings such as <div> back into readable text. Includes conversion statistics, copy, and TXT download support.
Text Input
Enter text to convert into HTML entities or restore back to plain text, then choose the options you need.
Conversion Result
Check the HTML entity encoding or decoding result, then copy it or save it as a file.
Enter text and click Encode or Decode.
HTML Entity Conversion Comparison
Use encoding, decoding, whitespace, and line break options depending on your task.
Convert HTML tags or special characters into <, >, and & so they are not interpreted as real HTML elements.
Restore entity-encoded strings back to their original text. Useful when reviewing copied source code or document content.
Convert spaces to or line breaks to <br> to control how text appears in HTML documents.
Help
What is an HTML Entity Encoder / Decoder?
HTML Entity Encoder / Decoder is a free developer utility that converts special characters into entity codes such as <, >, &, and ", or restores entity codes back to readable text.
It is useful for writing blog posts, displaying HTML code examples, editing templates, writing development documentation, and showing source code safely.
Features
- Encode HTML special characters into entities
- Decode HTML entity strings
- Choose basic or extended special character encoding
- Options for single quotes, spaces, and line breaks
- Check character count, line count, target count, and entity count
- Copy the result or download it as a TXT file
Use Cases
- Display HTML code examples safely in blog posts
- Show tags such as <div>, <span>, and <script> as text
- Restore entity-encoded strings back to readable text
- Make copied entity code from page source easier to read
- Insert code snippets into documentation or tutorials
- Check special character display issues in templates
What does basic special character encoding convert?
Basic encoding converts common HTML-sensitive characters such as <, >, &, double quotes, and single quotes into entity codes.
When should I use all special character encoding?
Extended encoding converts special characters except common Korean, English letters, numbers, and whitespace into numeric entities. It can help improve compatibility or clarify special symbols.
When should I convert spaces to ?
HTML may collapse multiple spaces into one. Converting spaces to helps preserve spacing in text or code examples.
When should I convert line breaks to <br>?
Use this option when you want plain text line breaks to appear as visible line breaks in HTML output.
Can decoded dangerous HTML run automatically?
This tool displays results as text. However, before inserting decoded HTML into a real webpage, check for risky elements such as scripts, iframes, and event attributes.
Notice
This tool is for converting HTML special characters and entity strings. It is not a security scanner for detecting script execution or vulnerabilities.