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.
Keyboard shortcuts
Ctrl/⌘ + Enter: process
Ctrl/⌘ + Shift + F: full screen
Esc: exit full screen
Ctrl/⌘ + F in editor: search
How to use
- Paste text containing markup characters or entities, or load the sample.
- Choose Encode to escape special characters or Decode to read entities.
- Review the output, especially unknown named entities or invalid numeric references.
- 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.
<strong>A & B</strong>
<strong>A & B</strong>
Read numeric entities
Decode mode resolves numeric references and common named entities in one pass.
👋 & 'hello'
👋 & '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: &lt; becomes <. 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, &lt; becomes <, 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.