Developer Tools

HTML Entities

Encode special characters into HTML entities or decode entity codes back into readable text.

Run tool

The HTML Entities converter converts plain text into escaped HTML character entities or restores encoded entity strings back into readable characters. In web development, embedding characters such as ampersands, angle brackets, and quotes directly inside HTML markup can alter page structure or produce rendering errors. Converting special characters to their corresponding entity sequences ensures that web browsers display the text exactly as intended without parsing it as markup tags. To use the tool, paste your snippet into the input area and select the operation. The converter defaults to escaping text, which transforms symbols like < and > into &lt; and &gt;. When you provide text with entity codes and switch the operation from encoding to decoding, the tool unescapes those entities back into regular symbols. If the input area remains empty, the tool produces an empty output. This utility works with raw text snippets, code samples, templates, and general web page markup.

Instructions

  1. Paste or type the text you want to convert into the Text field.
  2. Set Mode to perform encoding to escape special characters, or choose decoding to restore original characters.
  3. Run the tool to process the input text.
  4. Copy the transformed output from the result panel for use in your markup or code.

Examples

  • Encoding characters: entering <div>"Hello & Welcome"</div> produces &lt;div&gt;&quot;Hello &amp; Welcome&quot;&lt;/div&gt;.
  • Decoding entities: entering &lt;span&gt;Price &amp; Tax&lt;/span&gt; with decoding selected outputs <span>Price & Tax</span>.

FAQ

What happens if I run the tool with an empty text field?

When the text input is left blank, the tool returns an empty output without performing any conversion.

Which characters are escaped when encoding?

Encoding converts reserved HTML characters such as angle brackets, ampersands, and quotes into their standard HTML entity codes.

How do I switch from encoding to decoding?

Change the Mode setting to decoding, and the tool will unescape existing HTML entities back into regular text.

Does this tool support numeric entity codes?

When decoding, standard named HTML entities as well as numeric character references are converted back to their original characters.

Embed this tool

Add this working SmartPlusLab tool to your website with the code below.