Online Tool Store Online Tool Store
🔤 Developer

· 5 min read

How to Look Up Any Character's Unicode Codepoint

Manesh Jayawardhana

CIO & Co-founder

Manesh Jayawardhana is the CIO and Co-Founder of Ceyentra Technologies, where he has spent over nine years leading the design and delivery of software solutions for clients across the globe, spanning web, mobile, AI, and capital market systems. He has grown Online Tool Store's engineering team from the ground up while steering the company's technical direction. His writing draws on this breadth of experience building and shipping software across a wide range of industries and markets. View on LinkedIn

Share

How to Look Up Any Character's Unicode Codepoint

A character displays as a mysterious box, a garbled sequence, or behaves unexpectedly in a string comparison — and debugging that kind of encoding issue means actually inspecting the character at the byte and codepoint level, not just looking at how it renders visually. A single visible character can correspond to different underlying representations depending on encoding, and understanding exactly which representation you’re dealing with is often the key to fixing the actual bug.

Unicode’s layered representation — codepoint, UTF-8 bytes, UTF-16 units, HTML entity — each serve different purposes in different contexts, and a genuinely useful character inspector needs to show all of them together, not just one.

What all these different character representations actually mean

A Unicode code point is the character’s unique identifying number within the Unicode standard, typically written as U+XXXX in hexadecimal. The decimal value is that same number expressed in base 10, useful for contexts that expect decimal rather than hex. UTF-8 bytes show how the character is actually encoded for storage or transmission in the most common web encoding — some characters take one byte, others take up to four, depending on the codepoint’s range. UTF-16 units show the equivalent for UTF-16 encoding, used internally by some programming languages and systems, which encodes some characters as a single 16-bit unit and others as a “surrogate pair” of two units. The HTML entity is the character’s escaped representation for safe use in HTML markup.

Debugging an actual encoding bug often means comparing what a system expected against what it actually got at one of these specific representation levels — a mismatch between expected and actual UTF-8 bytes, for instance, points to a genuinely different class of problem than a codepoint that’s simply the wrong character entirely.

Why people get stuck here

  • A character’s visual appearance doesn’t reveal its underlying representation. Two characters that look identical or a character that renders as a mysterious box could have very different underlying codepoints or encodings, which isn’t visible just by looking at rendered text.
  • Different systems and languages expect different representations. A bug in one context might trace back to a UTF-8 byte-level mismatch, while a similar-looking bug elsewhere might be a UTF-16 surrogate pair issue — knowing which representation actually matters for your specific bug requires inspecting more than one.
  • HTML entities and raw characters get confused in web contexts. Not recognizing when a character needs to be represented as an HTML entity for safe markup, versus used directly, is a specific and common source of rendering bugs on the web.
  • Encoding bugs are often invisible until they cause a downstream failure. A subtly wrong encoding can pass silently through several processing steps before finally causing a visible error much later, making the actual root cause harder to trace back.

What a good Unicode character inspector looks like

Shows codepoint, decimal, UTF-8 bytes, UTF-16 units, and HTML entity together

Since debugging a specific encoding issue can require any one of these representations, having them all visible together saves switching between separate lookup tools or references.

Handles any character you paste in directly

Being able to inspect the actual specific character causing a problem, rather than looking one up from a reference chart, is what makes the tool useful for real debugging rather than general reference.

Presents the technical detail clearly and precisely

Since encoding debugging often comes down to a precise byte-level or codepoint-level comparison, clear, unambiguous presentation of the exact values matters for actually spotting a mismatch.

Common mistakes to avoid

  • Assuming two visually identical characters are the same underlying character, when they can have entirely different codepoints.
  • Debugging an encoding issue without checking the specific representation level (codepoint, UTF-8, UTF-16) that’s actually relevant to the bug you’re chasing.
  • Confusing when a character needs an HTML entity representation for safe markup versus when it can be used directly.
  • Assuming an encoding bug’s root cause is where it first became visible, rather than tracing back through earlier processing steps where a subtle mismatch could have first occurred.

How to do it with Unicode Character Inspector

Online Tool Store’s Unicode Character Inspector inspects any character’s Unicode code point, decimal value, UTF-8 bytes, UTF-16 units, and HTML entity, entirely in your browser.

  1. Paste or type the specific character you’re debugging.
  2. Review its codepoint, decimal value, UTF-8 bytes, UTF-16 units, and HTML entity together.
  3. Compare against what your system or code actually expected.
  4. Use the mismatch to pinpoint the real source of the encoding bug.

Because it shows every relevant representation together for the exact character you’re inspecting, you can quickly pinpoint which level (codepoint, byte encoding, or entity) is actually causing your specific bug.

Frequently asked questions

What’s the difference between a codepoint and its UTF-8 bytes?

The codepoint is the character’s unique identifying number in the Unicode standard; UTF-8 bytes are how that codepoint actually gets encoded for storage or transmission — some codepoints encode as a single byte, others as up to four, depending on their range.

Why would I need the HTML entity representation?

For safely displaying certain characters within HTML markup without them being misinterpreted as markup syntax themselves — knowing a character’s HTML entity is useful when debugging web rendering issues specifically.

Why do two seemingly identical-looking characters sometimes behave differently in code?

They can have entirely different underlying codepoints despite rendering visually the same, which is exactly the kind of mismatch that’s invisible without inspecting the actual codepoint or byte-level representation directly.

Final thought

Encoding bugs live at the codepoint and byte level, invisible from how a character simply renders on screen. Inspect the exact representation your specific character actually has, and compare it against what your system expected.

Try the free Unicode Character Inspector

#unicode character inspector#utf-8 byte viewer#code point lookup#unicode codepoint checker#online-tools#free-tools