Skip to content

Install ALink Tools

Free browser tools for images, PDFs, media, text and web checks. Most tools process files locally on your device.

  1. Tap the Share button in the Safari toolbar.
  2. Scroll down and tap Add to Home Screen.
  3. Tap Add. ALink Tools then opens from your Home Screen like an app.

HTML Encoder / Decoder

Escape text so it can sit safely inside HTML, or turn entities back into characters. This page only rewrites text — it does not run scripts or render a page.

Runs in your browserText only — not renderedRuns in your browser
1

Text and mode

Direction

Limits

  • The input is limited to 2 MB of UTF-8 text (8 MB if you load a file). Larger files can run out of memory in a phone browser tab.
  • Only a common set of named entities is recognized when decoding; obscure names stay as text.
  • The result is plain text. It is not sanitized for XSS and is not run as HTML.
  • Surrogate code points and values above U+10FFFF in numeric references are left unchanged.
2

Result

How to use HTML Encoder

  1. Paste the textType or load a file of HTML or plain text.
  2. Choose encode or decodeMinimal escaping, attribute escaping, named entities, or numeric character references.
  3. Copy the resultCopy or download the rewritten text, or send it back to the input to reverse the step.

What is encoded

Minimal mode replaces &, < and >. Attribute mode also replaces quotes, which is what you want inside an HTML attribute. Named mode uses common HTML5 entity names (for example &copy;) and numeric references for other non-ASCII characters. Numeric mode uses &#…; for every special or non-ASCII character.

Decoding accepts named entities from a common HTML5 set, decimal &#123; and hexadecimal &#x7B;. Unknown names are left unchanged. This is not a browser HTML parser and will not execute markup.

Frequently asked questions

Is my text or file uploaded?

No. Everything runs in your browser tab with JavaScript. Nothing you type, paste or drop is sent to a server, logged or stored by ALink Tools.

Will this stop cross-site scripting?

Encoding text before you insert it into HTML is one necessary step, but this page is not a sanitizer. It will not strip script tags or fix unsafe URLs for you.

Why did an entity not decode?

It may be outside the common named set used here. You can still decode it if you rewrite it as a numeric reference, such as &#x202F;.

Is this the same as URL encoding?

No. Use URL Encoder / Decoder for percent-encoding. HTML entities and URL encoding solve different problems.

Related tools

All tools