Browse the guides
Docs

Convert HTML entities without running markup

Convert between characters and HTML references, read conversion warnings, and copy the form your editor needs. Markup stays visible as text.

ON THIS PAGE
  1. Choose encode or decode
  2. Review output as literal text
  3. Read malformed-input feedback
  4. Copy the form you actually need

Choose encode or decode

Open HTML Entity Converter and choose a conversion mode. Encoding writes character-reference notation; decoding turns that notation back into text. The tool shows the result literally rather than rendering an HTML page.

TaskInputExpected text
Decode a named reference&&
Decode a hexadecimal referenceAA
Decode a decimal referenceAA
Text → named HTML entities< & >&lt; &amp; &gt;

A semicolon closes each reference in these examples. GlyphIndex uses a deliberate text-conversion policy and reports unsupported or malformed spellings instead of promising to reproduce every error-recovery rule of an HTML parser. Read the feedback alongside the output, especially when converting a string obtained from another system.

Review output as literal text

Copy this input and choose HTML entities → text, then Convert.
&lt;img src=x onerror=alert(1)&gt;
Expected decoded output: literal text in the result field.
<img src=x onerror=alert(1)>

The angle brackets should stay visible in the result. The sample should not load an image or show an alert. If you move the result into another application, that application’s parsing rules apply. See checking text before publishing for the difference between a plain-text field and HTML source.

Decoded markup-looking output stays literal text in the result field.
Actual browser: HTML entities decode to literal text; the sample creates no image element or alert.

Read malformed-input feedback

Input to reviewWhy it needs attentionNext action
&notARealGlyphIndexEntity;The name is not a supported HTML reference.Correct the spelling or retain it intentionally as literal text.
&#x110000;The number exceeds the Unicode scalar range.Check the intended code point rather than accepting a replacement silently.
&#xD800;A surrogate value is not a Unicode scalar value.Use a valid complete code point, not half of a UTF-16 pair.
&ampThe final semicolon is missing.Add the intended semicolon or keep the text unchanged.

If some references convert and others need attention, compare the output with the original before copying. A warning belongs to the exact location or token it describes; it is not an instruction to remove every ampersand. Ordinary prose can contain an ampersand that was never meant to start an entity.

Issue locations are zero-based UTF-16 offsets: the first unit is at 0. In A😀 &bogus;, the ampersand starts at offset 4 because A uses one unit, 😀 uses two, and the space uses one. Use the offset to find the reference that needs attention, rather than counting visible glyphs.

Decoding processes one layer: &amp;lt; becomes &lt;. Numeric control values are flagged and kept as their scalar values rather than receiving an HTML parser’s legacy remapping. For example, &#128; produces U+0080 with control-value feedback. This deliberate policy is another reason to inspect a result instead of treating the tool as a browser parser.

Copy the form you actually need

For a plain-text note, you usually want the displayed character rather than its entity spelling. For an HTML source workflow, you may need encoded notation. Choose based on the destination, then paste into a draft and check the result. Do not repeatedly encode an already encoded string unless that extra representation layer is intentional.

Three representations to distinguish while reviewing a publishing workflow.
One character: ≤
Named reference spelling: &le;
Hexadecimal reference spelling: &#x2264;

Sources and method

Copy manually

Couldn’t copy automatically. Select the text below and use your device’s Copy command.

Use your device’s Copy command, then paste the text where you need it.

Character details

Code points
UTF-8 bytes
View character details

Appearance can vary by font.

Your saved symbols

Save symbols for another visit in this browser. They won’t appear on your other devices or browser profiles.