How to Encode and Decode HTML Codes
Developer · Step-by-step guide · 4 steps · 2 min read
Some symbols, like < and &, have a special job in a web page. To show them as normal text, you write them as short codes. This tool does that for you, and can undo it too.
Open the HTML Encoder / Decoder
In the pictures, orange letters like A show where to look. Each step tells you its letter.
Step 1: Paste your text
In 1 Your text, paste it into Text to encode or decode. See A in the picture.
Step 2: Choose where the text goes
In 2 Encode or decode, pick Page content for normal page text. Pick Inside an attribute for text inside a tag, like title="…". See B in the picture.
Step 3: Press a button
Press Encode HTML. To go back, press Decode HTML Entities. More options are under Other escapes. See C in the picture.

Step 4: Copy the result
The result shows below with a letter count. See D in the picture.

Tips and questions
Why do I need this?
If you put <b> in a page, the browser treats it as code. Encoding shows it as text. It also helps stop attacks when you show text that users typed.
Where can I look up a code?
Open HTML Entity Reference at the bottom of the tool. It lists all 252 named codes.
Is this the same as URL encoding?
No. This is for text on a page. URL encoding is for text in a web address. Use the URL Encoder for links.
Privacy
Your data is handled in your browser. It is never sent to us. So it is safe to paste private or work data.
Try it now
The HTML Encoder / Decoder is free. You do not need an account.
Open the HTML Encoder / Decoder