HTML Entity Encoder & Decoder

Developer toolNew

Encode or decode HTML entities and special characters.

This tool runs entirely in your browser. Your files never leave your device — nothing is uploaded.

Text to encode

Result

Enter some text on the left to see the encoded result here.

Frequently asked questions

What does the HTML entity encoder do?
It replaces the five characters that are unsafe in HTML markup — & < > " and ' — with their entity references (& < > " '). This lets you safely paste text into HTML attributes or page content without breaking the markup or risking injection.
Can it decode numeric character references like ' or &#x3C;?
Yes. The decoder reverses common named entities (amp, lt, gt, quot, apos, nbsp) as well as decimal references such as &#65; and hexadecimal ones such as &#x42;. Any entity it does not recognise is left untouched so your text is never silently corrupted.
Is my text uploaded to a server?
No. All encoding and decoding happens entirely in your browser using plain JavaScript string operations. Your input never leaves your device and nothing is sent over the network, so it is safe to use with private or sensitive content.