ToolzyLab ToolzyLab

HTML Entity Converter

Escape or unescape HTML entities instantly right in your browser. Convert special characters into safe HTML entities, decode entity-heavy content back into readable text, and inspect your input with clean side-by-side analysis.

Smart Entity Escape & Decode Tool

Perfect for developers, bloggers, CMS users, web editors, and anyone working with HTML snippets, code blocks, templates, emails, or content that needs safe rendering. It supports named entities, decimal entities, hexadecimal entities, quote controls, and repeated decoding.

๐Ÿ” Escape HTML ๐Ÿ”“ Unescape Entities ๐Ÿง  Auto Detect ๐Ÿ”ข Decimal & Hex ๐Ÿ’ฌ Quote Control ๐Ÿ”’ Browser Only
๐Ÿงพ

Drop text or paste entity content

Paste raw HTML-sensitive text or entity-heavy content to escape or decode it instantly.

HTML-safe output ยท named / numeric / hex entities ยท repeat decode ยท copy / download ยท no uploads

Entity Conversion Controls

Choose how entities should be encoded or decoded, how quotes should behave, and whether decoding should happen once or until stable.

๐ŸŸก Waiting for input
Ready. Paste text or HTML entities to begin.
StatusWaiting
ActionAuto
Characters0
Output Size0
Entities Found0
Tags Detected0

Input & Converted Output

Use the left side for raw text or encoded entities and the right side for the converted result inside fixed scrollable editors.

No action yet Line 1, Col 1

Input

Editable 0 chars
1
Ready for input
Detection idle

Output

Result preview 0 chars
1
No output yet
Type idle

Entity Analysis

Inspect what the input contains, including named entities, numeric entities, tags, angle brackets, quotes, and potential decode behavior.

Run the tool or click Analyze Text to inspect the current content here.

Best practice

Use Minimal safe HTML when you only need the essential characters escaped for safe display. Use Named entities for readable entity output. Use Numeric or Hex when you want more technical or machine-style entity formatting.

This tool works fully offline in your browser. Nothing is uploaded or sent anywhere.

Result Snapshot

See what happened to the current result, including entity counts and output size.

Snapshot idle
Detected Typeโ€”
Named Entities0
Decimal Entities0
Hex Entities0
Potential Tags0
Output Size0 B

Keyboard shortcuts

  • Ctrl + Enter process content
  • Ctrl + K analyze input

What this tool can handle

Raw text with special HTML characters, already-escaped HTML snippets, named entities like &, numeric entities like &, hex entities like &, and mixed content copied from editors, CMS tools, HTML emails, or code blocks.

Context-aware character escaping and decoding

Escape reserved HTML characters without assuming entity conversion makes unsafe markup safe

Character references represent reserved or hard-to-type characters in HTML source. Choose encode or decode, named or numeric style, quote and space handling, decode depth, and input cleanup from the exact destination context, then verify ampersands, angle brackets, quotes, non-breaking spaces, and Unicode characters.

Context

Text content, quoted attributes, URLs, CSS, and JavaScript require different escaping

Encoding less-than and ampersand is important in HTML text. Quote handling depends on the attribute delimiter. Data inserted into a URL, style, or script needs the rules of that language as well. Do not apply one generic entity pass to mixed markup and assume every parser boundary is secure.

Reference style

Named, decimal, and hexadecimal references can represent the same Unicode character

Named references are readable for common symbols, while numeric references cover any allowed code point. Modern UTF-8 pages can contain most characters directly; references are most useful for reserved syntax, invisible spacing, or source conventions. Always include semicolons for predictable parsing.

Decode depth

Repeated decoding can turn harmless-looking text into active markup

A value such as an encoded ampersand may reveal another reference after one pass. Decode only the number of layers the data format expects. Multiple untrusted decoding steps can produce angle brackets, quotes, or script content and create an injection vulnerability in a later sink.

Practical review

Entity conversion check

Inspect the transformed value in the exact parser context where it will be used.

  • Identify whether the destination is HTML text, an attribute, URL, CSS, or JavaScript.
  • Check ampersands, angle brackets, both quote types, and semicolon termination.
  • Distinguish normal spaces from non-breaking spaces and invisible marks.
  • Decode only the expected number of layers and never as a sanitization step.
  • Render a trusted test case and verify the resulting Unicode characters.

Technical references: MDN character reference guide

HTML entity questions

Reserved characters, quotes, numeric references, spaces, Unicode, and double decoding

Which characters must be escaped in HTML text?

Ampersand and less-than need special care because they begin references and tags. Greater-than is often escaped for clarity. Attribute quotes depend on the chosen delimiter.

What is the difference between named and numeric entities?

Named references use memorable names for supported characters. Decimal and hexadecimal numeric references use the Unicode code point and can represent a broader set.

Should every non-ASCII character be converted to an entity?

Usually not on a correctly declared UTF-8 page. Direct Unicode is readable and standard. Escape reserved syntax or use references where a specific source format requires them.

What does a non-breaking space entity do?

It creates a space that normally prevents a line break at that point. It is not a general indentation tool and can cause awkward wrapping when overused.

Why is decoding HTML entities twice dangerous?

The first pass can reveal a second encoded sequence, and the next can turn it into markup or quotes. Decode only according to the defined data boundary.

Does HTML escaping prevent every form of XSS?

No. Escaping must match the output context, and URL, CSS, JavaScript, and DOM sinks have different rules. Use safe APIs, sanitization, and a complete security design.