Encoding & Decoding Tools

HTML Escape / Unescape

Escape HTML syntax characters in text or decode common and numeric entities. Inspect a snippet safely as text, with no server-side processing.

✓ Every tool runs in your browser. We do not upload your input or output.

HTML Escape / Unescape
Keyboard shortcuts

Ctrl/⌘ + Enter: process

Ctrl/⌘ + Shift + F: full screen

Esc: exit full screen

Ctrl/⌘ + F in editor: search

Escaped or unescaped text
ReadyLines: 1 · Characters: 0 · Size: 0 KB · Time: — · Cursor: 1:1

How to use

  1. Paste text containing markup characters or entities, or load the sample.
  2. Choose Encode to escape special characters or Decode to read entities.
  3. Review the output, especially unknown named entities or invalid numeric references.
  4. Copy or download the result for your template or data workflow.

Examples

Show markup as text

Angle brackets and the ampersand become entities instead of active markup.

Input
<strong>A & B</strong>
Output
&lt;strong&gt;A &amp; B&lt;/strong&gt;

Read numeric entities

Decode mode resolves numeric references and common named entities in one pass.

Input
&#x1F44B; &amp; &#39;hello&#39;
Output
👋 & 'hello'

Put literal text into an HTML context

If a page must display a literal tag such as <strong>, its angle brackets cannot be treated as markup. Escape mode replaces the characters that commonly have structural meaning in HTML: &, <, >, double quotation marks, and apostrophes. The result can be useful when checking what a template should render or preparing a short example for documentation.

Escaping is context-sensitive in real applications. This tool demonstrates text escaping; it does not replace your template engine’s contextual escaping for attributes, JavaScript strings, CSS, or URLs. Keep application output rules close to the code that renders the value. The tool does not render or execute the input, so a pasted snippet remains plain text on the page.

Decode only the entities you intend

Decode mode recognizes six common named entities and decimal or hexadecimal numeric character references. Unknown names remain unchanged so a spelling mistake is visible. Numeric references outside Unicode’s valid range produce an error instead of a replacement character. Decoding happens in one pass: &amp;lt; becomes &lt;. If you process that output a second time, it becomes <.

The input and output stay in the browser. A Web Worker handles processing, and the shared workspace keeps its height when a long snippet is pasted. Copy and Download provide the complete result, including characters beyond the visible preview.

Frequently asked questions

Which characters are escaped?

Encode mode replaces ampersands, angle brackets, double quotes, and apostrophes. Other text is left unchanged.

Does Decode support every named HTML entity?

No. It supports amp, lt, gt, quot, apos, and nbsp, plus decimal and hexadecimal numeric references. Unknown names stay unchanged.

Will Decode run the resulting HTML?

No. The output is displayed as text in the workspace, not inserted as live HTML.

Can I decode nested entities repeatedly?

One Process action decodes once. For example, &amp;lt; becomes &lt;, not an angle bracket.

What if a numeric entity is invalid?

Out-of-range Unicode values and surrogate code points produce an error with a location.

Related tools