SECURITY & ENCODING · BFOTKIT

HTML entity encoder and decoder online.

Escape special characters for safe display in HTML, or convert entities such as & and ' back to characters — instantly in your browser.

Output

Conversion runs entirely in this browser tab. Nothing is sent to a server.

GUIDE

How to escape and unescape HTML

Escape before displaying user content

Any text that comes from users, forms, or feeds and will be shown inside a page should be escaped, so a typed <script> renders as visible text instead of running. The encoder converts <, >, &, and quotes into their named entities, which browsers then display literally instead of interpreting as markup.

Choose the quote handling

The default escapes double quotes and ampersands, which covers attributes using double quotes. The single-quote option also escapes apostrophes for attributes delimited with single quotes. If you only need body-text escaping, the default is enough and produces less clutter.

Decode with care

Unescaping converts entities back to characters, which is useful for reading snippets, email templates, or logs where content was stored escaped. Never paste untrusted content into a decoder that feeds a live page — decoding is exactly the step that would re-activate markup that was safely escaped.

Numeric entities are supported

Both named entities such as &amp; and numeric forms such as &#38; and &#x26; decode correctly. Non-Latin characters often appear as numeric entities in exports; this tool turns them back into the original letters so you can read and search the text normally.

HELP / FAQ

HTML entity questions

Which characters are escaped?

The five markup-significant characters: ampersand, less-than, greater-than, double quote, and — with the option enabled — single quote. These are the characters that change meaning inside HTML documents and attributes.

Is escaping the same as sanitizing?

No. Escaping preserves the text but displays it safely; sanitizing removes or neutralizes dangerous markup. Escaping is usually the right choice for showing user text; sanitizing requires a dedicated parser and policy.

Why does my text still look escaped after decoding?

Some content is double-escaped, so &amp;amp; becomes &amp; after one pass and & only after two. Run the decoder again if the first pass still shows entity text.

Is the conversion private?

Yes. Escaping and unescaping happen in this browser tab and nothing is uploaded to a server.

EXPLORE BY CATEGORY · BFOTKIT

More tools like this

Pick a category to see every tool in it — then open one and discover related tools.

Browse all tools