Show markup in an explanation
Encode a short example such as <b> so an HTML text context can display the tag instead of treating it as a formatting instruction.
Turn special characters into HTML entities or restore them to readable text directly in your browser.
HTML entity encoding turns characters that could be interpreted as markup into text references. Decoding reverses that process to recover readable characters from an escaped excerpt. Choose the action explicitly: an ordinary ampersand in a name or sentence cannot reliably indicate the intended direction. Results remain text in an output field rather than an active HTML page. Processing runs in your browser without sending the excerpt to a remote conversion service.
Encoding replaces five characters: & with &, < with <, > with >, double quotes with " and apostrophes with '. Accented letters, symbols and emoji remain Unicode characters. This is useful for many HTML text contexts, but it does not turn every non-ASCII character into a named reference.
Decoding recognizes named HTML references and decimal or hexadecimal numeric references. Some historical spellings without a semicolon follow HTML compatibility rules; use a terminating semicolon for predictable input. Unknown sequences are not arbitrarily replaced with other characters. Literal text and any existing tags are neither executed nor removed.
Each execution decodes one layer. &lt; becomes <, rather than immediately becoming <. This prevents consuming several escaping layers without an explicit choice. Encoding an already written reference also escapes its ampersand: < becomes &lt;. That extra layer can be intentional when documenting the source spelling of an entity.
Escaping depends on the destination context. This tool does not sanitize an HTML document or independently secure a URL attribute, JavaScript fragment or CSS rule. Decoded text may become unsafe if another application later inserts it using innerHTML. Prefer text insertion or a dedicated sanitizer when handling untrusted content.
Paste or import the excerpt without first changing ampersands, quotes or semicolons. Their original spelling matters when diagnosing multiple encoding layers.
Encode raw characters to represent HTML text; decode existing references to recover characters. This form never guesses the direction from its input.
Inspect before copying or downloading the text output. Editing the source hides the previous result. Reset clears both the source and output.
Encode a short example such as <b> so an HTML text context can display the tag instead of treating it as a formatting instruction.
Decode escaped labels or descriptions. This restores characters without stripping tags or converting an entire document into plain text.
Compare one layer at a time when & appears unexpectedly in an interface. Locate the step that already escapes a value before adding another conversion.
The ampersand and both brackets become references. Letters and spaces remain unchanged; the output describes a tag without creating live markup here.
Input
Tom & Jerry <b>Result
Tom & Jerry <b>The named reference produces ©, the hexadecimal reference produces an emoji, and &lt; loses only one layer to become <.
Input
© 😀 &lt;Result
© 😀 <The input already contains the spelling of a reference whose ampersand needs escaping. That output can display < literally in HTML documentation. Choose decoding when you want the character < instead.
No. It replaces references with characters. A literal tag remains written in the output text; this tool is neither a text extractor nor an HTML sanitizer.
The encoder retains Unicode and escapes its five designated characters. It does not require ASCII-only output. The decoder can still read numeric references representing accented characters and emoji.
Encoding is context-specific rather than a universal guarantee. URLs, scripts, styles and attributes need their own checks. Do not automatically insert decoded text into active HTML.
Related tools
Tools similar or complementary to this one.
Format HTML or remove ordinary comments locally while retaining text whitespace and script content. No page execution or upload is required.
Convert HTML into readable portable Markdown directly in your browser.
Encode text as Base64 or decode a Base64 string back to its original content.
Understand ISO 8601 week numbers, Unix timestamps in seconds or milliseconds, and the difference between human-readable dates and technical time values.