To show code on a web page, the angle brackets and ampersands in it must be written as entities, or the browser treats them as markup. Encoding does that; decoding reverses it.
Decoding understands every named and numeric entity, whether it is written as a word such as the one for a non-breaking space or as a number such as the code of the euro sign. An option also encodes letters outside ASCII for pages that cannot be saved as UTF-8.
How to use the HTML Encode and Decode tool
- Choose Encode or Decode.
- Paste the text or HTML.
- Copy the result.
Popular uses
- Showing HTML or XML code inside a blog post
- Cleaning text littered with visible ampersand and quote codes
- Preparing user text for safe display
Tips for the best result
- Encode before putting text inside an attribute value as well as between tags.
- Text that shows the code for an ampersand in plain sight has been encoded twice; decode it twice.
Quick facts
| Price | Free |
|---|---|
| Works with | Text |
| Where it runs | In your browser, on your device |
| Account | Not needed |