● online
Ctrl+Kto search

HTML Encoder and Decoder

Escape HTML special characters so markup displays as text instead of rendering, or decode entities back into plain characters.

How to use the HTML Encoder and Decoder

  1. Paste your HTML or entity-encoded text.
  2. Choose encode or decode.
  3. Copy the result.

About the HTML Encoder and Decoder

Escaping user input before it is inserted into a page is the basic defence against cross-site scripting: converting angle brackets and ampersands into entities means a submitted <script> tag displays as text rather than executing. It is also what you need when writing a tutorial that shows code examples on a page. Decoding goes the other way, turning entity-laden output back into something readable.

Frequently asked questions

Which characters need HTML encoding?

Primarily < > & " and ', because they have structural meaning in HTML and attributes.

Does encoding prevent XSS?

Escaping output correctly for its context is a key defence, but it is not a complete solution on its own — validate input and set a content security policy too.

Why do I see &amp;amp; in my page?

Double encoding — the text was escaped twice. Decode it once here to fix it.

Related free tools

← Back to all 96 free online tools

Explore all 96 free tools

Ctrl K
96tools0uploads to servers100%free forever

🔥 Trending now

All tools