Free website audit in 60 seconds
Skip to content
Webmaster.ae
  • Loading…
Webmaster.ae
Free website auditSpeed, SEO, security and email, with a PDF report

Follow us

Runs in your browserFree · no sign-up

HTML entity encoder / decoder

Escape text so it displays safely in HTML — turning < into &lt; and & into &amp; — or decode HTML entities back into readable text. Optionally encode Arabic and other non-ASCII characters too.

Live resultUpdates as you type

Press “Convert entities” to see the result here.

How do I use the HTML entity encoder / decoder?

HTML entity encoder / decoder: frequently asked questions

Why escape HTML?

To show code or user input as text instead of letting the browser treat it as markup — and to prevent cross-site scripting.

Which characters must be escaped?

& < > in text, and " or ' inside attribute values.

Should I encode Arabic characters?

Usually not — UTF-8 pages display Arabic directly. Encode only for systems that cannot handle UTF-8.

Does it decode numeric entities?

Yes, both decimal (&#39;) and hex (&#x27;) forms, plus common named entities.

Is this enough to prevent XSS?

Escaping is one layer. Use your framework’s built-in escaping and a Content Security Policy as well.

Is my text uploaded?

No. It runs in your browser.

What is &nbsp;?

A non-breaking space that keeps two words on the same line.

What about URL encoding?

That is different — use our URL encoder for query strings.

Is there an API for this tool?

Selected tools are available through a rate-limited public API. Contact us if you need higher volumes.

Is the html entity encoder / decoder free?

Yes. It is free with no sign-up and no usage limits for normal use.