HTML Encoder

Developer Tools

Encode & decode HTML entities

FreePrivateInstant
Add a file · .txt .md .csv .json … · up to 2.00 MB

Similar tools you may like

History

All history →

HTML Encoder — at a glance

Convert < > & and quotes into safe HTML codes so they display as text instead of running as code.

HTML
<b>Hello</b> & bye
Encode
Safe entities
&lt;b&gt;Hello&lt;/b&gt; &amp; bye

How to use it — step by step

Useful for showing code on web pages and preventing XSS issues.

1

Encode or Decode

Choose what you want to do.

2

Paste your text

Add the HTML or the entity-encoded text.

3

Convert

The result appears instantly.

4

Copy

Paste into your page or blog post.

Pro tips

Small things that make the result better.

✦Always encode user-submitted text before showing it on a page.
✦&amp; is the code for the & symbol.
✦Decode when you see ugly codes like &quot; in your text.

Quick facts

&lt;stands for <
&gt;stands for >
&amp;stands for &
XSSencoding helps prevent it

Frequently Asked Questions

What is an HTML entity?+

It is a special code starting with & and ending with ; that shows a character, like &lt; for <.

Does encoding prevent XSS attacks?+

Encoding user input before output is one of the main defences, along with other security practices.

Is my data safe?+

Yes. Everything runs inside your own browser. Your text, files and images are never uploaded to any server.

More Free Tools