Developer Tools
HTML Decoder
Decode a limited set of HTML references: &, <, >, " and '. Unknown, malformed and other numeric references are left unchanged.
About this tool
Decode a limited set of HTML references: &, <, >, " and '. Unknown, malformed and other numeric references are left unchanged.
What is it?
The tool decodes only the case-sensitive references &, <, >, " and ' in a single pass. Decoding does not make HTML safe; the output is shown as text in a textarea.
How to Decode HTML Entities
Paste text containing entities and select Decode. Supported forms are converted to characters; other strings and whitespace are retained.
- Paste text containing one of the references supported by this tool.
- Choose Decode to convert the supported references back to characters.
- Review the output as text; decoding does not sanitize the result or make it safe to execute.
- If the result will be inserted into a page, apply the security rules for its destination context.
Examples
- <div>Hello & welcome</div> β <div>Hello & welcome</div>
- "It's ready" β "It's ready"
- &lt; β <
Common use cases
- Reading entity-encoded snippets copied from a document or log.
- Inspecting the character references supported by this decoder.
- Converting text back before a later, separately secured rendering step.
Technical details
- Only the case-sensitive forms ", ', <, > and & are replaced; other numeric references and entity names are left unchanged.
- Replacement is a single ordered pass, so &lt; becomes <, not <. Malformed and unknown entity text remains as typed.
- Whitespace and line breaks are preserved. Empty input produces empty output.
- The decoded value is assigned to a textarea, not innerHTML. Decoding is neither sanitization nor validation.
Related concepts
Which HTML References Does This Decoder Support?
The tool decodes only the case-sensitive references &, <, >, " and ' in a single pass. Decoding does not make HTML safe; the output is shown as text in a textarea.
Frequently Asked Questions
Which entity forms are decoded?
Only the case-sensitive references ", ', <, > and & are decoded. Other numeric references and entity names are unchanged.
What happens to unknown or malformed entities?
They remain as entered. Replacement is a single ordered pass, so &lt; becomes < rather than being decoded a second time.
Is decoded output safe to use as HTML?
Decoding is not sanitization. This tool writes output to a textarea, not innerHTML; apply the security rules for the destination context before rendering it elsewhere.
Related Tools
HTML Encoder
Convert &, <, >, double quotes and apostrophes into HTML character references. This encoder is not a sanitizer; XSS safety depends on the output context.
HTML Formatter and Minifier
Indent markup for readability or reduce whitespace between tokens. This formatter/minifier transforms text; it does not parse or validate HTML.