# HTML Encoder/Decoder

> Escape special characters for safe HTML display or convert entities such as &amp; back to characters. Named and numeric entities supported; nothing is uploaded.

[bfotkit](/) Runs in your browserCategories ▾[All tools 307](/en/tools/)[Text tools9](/en/tools/text-tools/)[Image tools27](/en/tools/image-tools/)[PDF tools20](/en/tools/pdf-tools/)[Social media tools97](/en/tools/social-media-tools/)[Security tools8](/en/tools/security-tools/)[Coding tools25](/en/tools/coding-tools/)[CSS tools12](/en/tools/css-tools/)[Color tools6](/en/tools/color-tools/)[Miscellaneous tools103](/en/tools/miscellaneous-tools/)

[All tools ↗](/en/tools/)[EN](/en/tools/html-encoder-decoder/)[PT](/pt-br/ferramentas/codificador-html/)[DE](/de/werkzeuge/html-kodierer/)[ID](/id/alat/pengode-html/)[RU](/ru/instrumenty/kodirovshik-html/)

SECURITY & ENCODING · BFOTKIT

# HTML entity encoder and decoder online.

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

InputEscape to entitiesUnescape entities

Also escape single quotesOutputCopy

Clear

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 & and & 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.

[All tools 307](/en/tools/)[Text tools 9](/en/tools/text-tools/)[Image tools 27](/en/tools/image-tools/)[PDF tools 20](/en/tools/pdf-tools/)[Social media tools 97](/en/tools/social-media-tools/)[Security tools 8](/en/tools/security-tools/)[Coding tools 25](/en/tools/coding-tools/)[CSS tools 12](/en/tools/css-tools/)[Color tools 6](/en/tools/color-tools/)[Miscellaneous tools 103](/en/tools/miscellaneous-tools/)

[Coding toolsPrivate JSON formatter and text cleanup tools↗](/en/tools/private-json-text-cleanup/)[Coding toolsURL Slug Generator↗](/en/tools/url-slug-generator/)[Coding toolsBase64 Encoder/Decoder↗](/en/tools/base64-encoder-decoder/)[Coding toolsURL Encoder/Decoder↗](/en/tools/url-encoder-decoder/)[Coding toolsHAR Sanitizer↗](/en/tools/har-sanitizer/)[Coding toolsJSON Formatter↗](/en/tools/json-formatter/)[Coding toolsJSON Validator↗](/en/tools/json-validator/)[Coding toolsJSON Tree Viewer↗](/en/tools/json-tree-viewer/)

[Browse all tools →](/en/tools/)

[bfotkit](/)[All tools](/en/tools/)[Privacy Policy](/en/privacy-policy/)[Terms & Conditions](/en/terms-and-conditions/)[About Us](/en/about-us/)[Contact Us](/en/contact-us/)

Useful tools. No fuss. © 2026 BFOTKit[bfotkit.com ↗](https://bfotkit.com/)
