Hex HTML Entities to Characters Converter

Convert hexadecimal HTML/XML character references (e.g. "é" back to "é") to their original characters, accepting both the lowercase-x and uppercase-X reference forms. Any surrounding text that isn't part of a recognized hex entity passes through completely unchanged. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-26

Overview

Introduction

This tool decodes hexadecimal HTML/XML character references, the standard &#xHHHH; notation, back into their original characters.

It's the exact inverse of characters-to-hex-html-entities-converter, and passes through any text that isn't part of a recognized entity completely unchanged.

What Is Hex HTML Entities to Characters Converter?

Hexadecimal character references are a real, standard HTML/XML notation for representing any Unicode code point as &#x followed by hex digits and a semicolon. This tool finds every such reference in your input and converts it back to the actual character it represents.

It recognizes both the lowercase-x (&#x...;) and uppercase-X (&#X...;) forms, since both are valid per the HTML/XML character-reference grammar.

How Hex HTML Entities to Characters Converter Works

A regular expression scans the input for the pattern &#[xX] followed by one or more hex digits and a semicolon, and for each match, parses the hex digits as a Unicode code point.

That code point is converted back into its character via String.fromCodePoint. Any text outside a matched entity is left untouched, and any match whose code point is out of Unicode's valid range is left as the original matched text rather than causing an error.

When To Use Hex HTML Entities to Characters Converter

Use this to read the actual text behind hex-entity-encoded content, scraped HTML, an RSS/XML feed, or output from characters-to-hex-html-entities-converter.

It's safe to run on mixed text where only some characters were entity-encoded; everything else is preserved exactly.

Features

Advantages

  • Decodes a real, standard notation recognized by every HTML/XML parser, not an invented format.
  • Leaves non-entity text completely untouched, so it's safe on partially-encoded or mixed content.
  • Correctly reconstructs characters outside the Basic Multilingual Plane, like emoji, from their single hex reference.

Limitations

  • Only recognizes the &#x.../&#X... hexadecimal form, not decimal numeric references (é) or named entities (é); use a dedicated decoder for those if you need them.
  • An out-of-range or malformed hex value inside a matched reference is left as literal text rather than guessed at or repaired.
  • Doesn't validate that the surrounding text is well-formed HTML or XML; it only looks for the specific entity pattern.

Examples

Decoding a single hex entity

Input

é

Output

é

Hex E9 is the Unicode code point for é, so the reference converts directly back to that character.

Decoding a hex entity mixed with plain text

Input

plain A text

Output

plain A text

Only the A entity is converted (to "A"); the surrounding plain text is left completely unchanged.

Best Practices & Notes

Best Practices

  • Use this specifically for hexadecimal references; if your source uses decimal (é) or named (é) entities instead, use a decoder that handles those forms.
  • Round-trip through characters-to-hex-html-entities-converter to confirm a lossless conversion, including for emoji or other non-BMP characters.
  • Run it safely on mixed content; anything that isn't a recognized hex entity is left exactly as-is.

Developer Notes

Implemented with a single global regex (/&#[xX]([0-9a-fA-F]+);/g) and String.replace's callback form, converting each match's hex digits to a code point via parseInt(..., 16) and back to a character via String.fromCodePoint, wrapped in a try/catch so an out-of-range code point falls back to leaving the original matched text unchanged instead of throwing.

Hex HTML Entities to Characters Converter Use Cases

  • Reading the actual text behind hex-entity-encoded HTML or XML content
  • Decoding output previously produced by characters-to-hex-html-entities-converter
  • Cleaning up scraped or exported content that mixes plain text with hex character references

Common Mistakes

  • Expecting decimal (é) or named (é) entities to be decoded; this tool only recognizes the hexadecimal &#x.../&#X... form.
  • Assuming a malformed or out-of-range reference will be silently fixed; it's deliberately left as literal text instead.
  • Forgetting that non-entity text in the input is preserved untouched, which is expected, not a sign the tool skipped something.

Tips

  • If a reference doesn't decode, check it's actually the hex form (&#x...;) and not decimal (&#...;) or named (&-style).
  • Round-trip through characters-to-hex-html-entities-converter first if you want a guaranteed-clean input to test decoding against.

References

Frequently Asked Questions