Find the Unicode code point for B

The Unicode code points for B and b, how to confirm them yourself, and why styled look-alike B characters are separate code points that can break search, copying and accessibility.

The plain Latin letter B is U+0042 (LATIN CAPITAL LETTER B), and the lowercase b is U+0062 (LATIN SMALL LETTER B). Those two values answer most searches for the B Unicode code point. The question often comes up when someone is looking at a B that looks unusual, such as bold, double-struck, fullwidth or circled, or one that came from another alphabet. Each of those is a different character with its own code point. This review explains how to tell them apart, how to check any B yourself, and when a styled substitute is a reasonable choice.

Is a styled B suitable for your use?

For anything that needs to be searched, indexed, read aloud, sorted or edited, use plain U+0042 or U+0062 and apply styling with formatting instead. Formatting includes bold in a word processor or CSS font properties on the web. The letter stays the same, so search, copy and assistive technology keep working as expected.

A Unicode look-alike, such as the mathematical bold capital B, has one real advantage: its appearance can travel into places that strip formatting, like plain-text profile fields or chat messages. The cost is that it is no longer the letter B as far as software is concerned. Reserve look-alikes for short decorative text where those losses are acceptable. Use them in actual mathematical notation, where they carry meaning. Avoid them in names, headings, product terms, or anything a reader may need to find or have read to them.

What a B transformation actually changes

There are two very different ways to make a B look different.

  • Visual presentation: bold, italic, a different font or a size change applied through formatting or CSS. The stored character is still U+0042 or U+0062. Only the rendering changes.
  • Character substitution: the B is replaced by a different code point that happens to resemble a styled B. The stored text changes, and so does everything that depends on it.

The word "font" is used loosely for both. Many online "font generators" do not change fonts. They substitute characters. If the styled text still looks styled after you paste it into a plain-text field, character substitution almost certainly happened.

"Mirror" and "reverse" are also ambiguous for this letter. A horizontally mirrored b looks like d, and an upside-down b resembles q. A tool that offers a "mirrored" or "flipped" b normally just outputs d or q, or another similar-looking character. It does not produce a true mirrored glyph. Unicode's mirroring property for right-to-left text applies to paired characters such as brackets, not to Latin letters, so B is not mirrored in bidirectional display. A true visual mirror requires a presentation-level transform such as a CSS scale or flip, which leaves the stored character unchanged.

Common characters that look like B

The code points below come from the Unicode Standard's character assignments. If an exact value matters for your work, confirm it against the Unicode Character Database or with one of the checks shown later.

Character | Code point | Unicode name | Notes
B | U+0042 | LATIN CAPITAL LETTER B | The standard capital letter
b | U+0062 | LATIN SMALL LETTER B | The standard lowercase letter
𝐁 | U+1D401 | MATHEMATICAL BOLD CAPITAL B | Intended for math notation; NFKC normalization maps it to B
𝐛 | U+1D41B | MATHEMATICAL BOLD SMALL B | Intended for math notation; NFKC maps it to b
𝔹 | U+1D539 | MATHEMATICAL DOUBLE-STRUCK CAPITAL B | Intended for math notation
ℬ | U+212C | SCRIPT CAPITAL B | Sits in the Letterlike Symbols block, not the math block
B | U+FF22 | FULLWIDTH LATIN CAPITAL LETTER B | Used alongside East Asian text; NFKC maps it to B
Ⓑ | U+24B7 | CIRCLED LATIN CAPITAL LETTER B | Enclosed form
ʙ | U+0299 | LATIN LETTER SMALL CAPITAL B | Used in phonetic notation
Β | U+0392 | GREEK CAPITAL LETTER BETA | Different letter from another script; does not normalize to Latin B
В | U+0412 | CYRILLIC CAPITAL LETTER VE | Different letter that looks like B; does not normalize to Latin B

The last two rows matter most when you are trying to identify a B. Greek Beta and Cyrillic Ve look like a Latin B in many fonts, but they are separate letters with their own meanings. Normalization will not convert them to Latin B. A word that contains one of them will not match a search for the Latin spelling. This is also why look-alike letters show up in spoofed names and addresses.

How to identify the code point of any B

The most reliable method is to ask software for the code point directly instead of judging by appearance. Most programming languages can do this in a single line. Paste the character you are unsure about between the quotes.

# Python
import unicodedata
ch = "B"
print(f"U+{ord(ch):04X}", unicodedata.name(ch))
# U+0042 LATIN CAPITAL LETTER B
// JavaScript
const ch = "B";
console.log("U+" + ch.codePointAt(0).toString(16).toUpperCase().padStart(4, "0"));
// U+0042

For characters beyond U+FFFF, such as the mathematical bold B at U+1D401, use codePointAt in JavaScript rather than charCodeAt. charCodeAt returns only half of the UTF-16 surrogate pair (0xD835), which looks like a wrong answer. Python's ord handles these characters directly.

If you don't want to run code, look for a "Unicode character inspector" or "Unicode code point lookup" tool, or the character viewer built into your operating system. Search terms that work well include "what Unicode character is this" and "identify Unicode character." These tools and their menu locations vary by platform and version, and none were verified for this article, so check that a tool reports both the code point and the official character name. The name is what tells a Latin B apart from a Greek Beta.

Writing B by its code point

Once you know the code point, you can write the character in other forms:

HTML (decimal):  B
HTML (hex):      B
CSS content:     "\42"
JavaScript:      "\u0042" or "\u{42}"
Python:          "\u0042"
UTF-8 bytes:     42

Mathematical bold capital B (U+1D401):
HTML (hex):      𝐁
JavaScript:      "\u{1D401}" or "\uD835\uDC01"
Python:          "\U0001D401"
UTF-8 bytes:     F0 9D 90 81

Plain B takes one byte in UTF-8, while the mathematical bold B takes four. That difference can matter in systems that limit text by bytes rather than by visible characters.

Will a substituted B survive copying and sharing?

Copying a substituted character usually copies the substitute, not the plain letter. Where the text ends up determines what happens next:

  • Search: text written with U+1D401 or U+FF22 will not match a search for B unless the search system applies compatibility normalization (NFKC or similar). Whether a given site or app does this has to be checked case by case.
  • Screen readers: a screen reader may announce a mathematical B by its full character name, describe it differently, or skip it. No scoped tests of particular screen readers were available for this article, so test with the assistive technology your audience uses before relying on styled characters.
  • Rendering: if the reader's fonts lack a glyph, they may see an empty box or a placeholder instead of the letter, especially for characters outside the most common ranges.
  • Editing and data handling: spell checkers, sorting, case conversion and validation rules usually treat substitutes as unrelated symbols. For example, a username or code that looks correct may still fail to match.

If styled characters must appear somewhere people rely on the text, also provide a plain-text version. Typical cases are an accessible label, an alt text field or the same content written normally nearby. Whether a styled B looks right on one device does not show how it will behave on another platform, in a search index or with a screen reader.

Gaps in this review

The code points and normalization behavior above come from the Unicode Standard. This review includes no tested results for specific browsers, social platforms, operating systems or screen readers, and it names no specific lookup tool because none could be verified. Treat any claim about how a particular destination handles a styled B as something to test yourself.