CalcSeed

Unicode Codepoint Calculator

Enter a decimal codepoint and see its hex form and the UTF-8 bytes that encode it.

=
Quick answer: with the default inputs (233 dec), the codepoint (hex) is 2. Change any input to update the result.
Codepoint (hex)
—

What the calculator returns

Enter a decimal codepoint between 0 and 1,114,111 and the tool returns three linked values: the codepoint in hex with a U+ prefix, the number of bytes UTF-8 needs, and the actual encoded bytes. The default is 233, which becomes U+00E9 and encodes as the two bytes C3 A9 — the letter é. Change the number and all three outputs move together.

U+h16=n\text{U+}h_{16}=n

Decimal to hex in one line

The hex form is the decimal value written in base 16, padded to at least four digits in conventional U+ notation. Divide by 16 repeatedly and read the remainders backward: 233 ÷ 16 = 14 remainder 9, and 14 is E, so the digits read E9. Unicode writes that as U+00E9, where the leading two zeros are padding rather than value.

The distinction matters when you search documentation. A codepoint is an abstract number, not an encoding. The same U+00E9 appears as one byte in Latin-1, two bytes in UTF-8 and two bytes in UTF-16, so quoting a codepoint never tells you the file size on its own.

How UTF-8 packs the bits

UTF-8 is a variable-length encoding. The high bits of the first byte announce how many bytes the character uses: 0xxxxxxx for one byte, 110xxxxx for two, 1110xxxx for three and 11110xxx for four. Every continuation byte starts with 10 and carries six payload bits, which is why each extra byte adds exactly 6 bits of range.

That design gives the thresholds 128, 2,048, 65,536 and 1,114,111. A codepoint below 128 fits seven payload bits and needs one byte. One below 2,048 needs 11 bits, which takes two bytes. Three bytes carry 16 bits, four carry 21, and 221 − 1 = 1,114,111 is the top of the Unicode range.

Codepoint rangeUTF-8 bytesFirst byte patternBits carried
0–12710xxxxxxx7
128–2,0472110xxxxx11
2,048–65,53531110xxxx16
65,536–1,114,111411110xxx21

Notice that the byte count is set by the range, not by the exact character. Everything from 2,048 to 65,535 costs three bytes, so a Greek letter and a Chinese character both occupy three bytes even though their codepoints differ by thousands.

Worked example: 233 to C3 A9

233 falls in the 128–2,047 band, so it takes two bytes. Write 233 in binary: 11101001. The payload needs 11 bits, so pad on the left to 00011101001 and split it into a 5-bit head and a 6-bit tail: 00011 and 101001.

Add the two-byte prefixes. The first byte is 110 followed by 00011, which is 11000011 = 0xC3. The second byte is 10 followed by 101001, which is 10101001 = 0xA9. The output C3 A9 is exactly what the calculator prints for utf8Hex, with utf8Bytes = 2.

Two bytes for one accented letter is not waste; it is the price of backward compatibility. Any byte below 0x80 is still a valid ASCII character, so a UTF-8 file of plain English is byte-for-byte identical to an ASCII file. Only the characters that ASCII cannot represent pay the extra byte.

Four examples side by side

CharacterDecimalHexUTF-8 bytes
A65U+004141 (1 byte)
é233U+00E9C3 A9 (2 bytes)
€8,364U+20ACE2 82 AC (3 bytes)
😀128,512U+1F600F0 9F 98 80 (4 bytes)

The jump from A to é doubles the byte count, and the euro sign at 8,364 costs three bytes despite being a single glyph. Emoji sit above 65,536, so they always take four bytes; a string of ten emoji is 40 bytes before any metadata.

Where codepoints and bytes diverge

  • String length: “é”.length is 1 in JavaScript but 2 in a UTF-8 byte count, because JS counts UTF-16 units
  • Database columns: varchar(10) in a UTF-8 table may reserve up to 40 bytes, depending on the engine
  • Slicing: cutting a 2-byte character after one byte leaves an invalid sequence that renders as a replacement glyph
  • HTTP headers: only ASCII is legal in header values, so non-ASCII text is percent-encoded instead
  • Sort order: byte order and codepoint order agree in UTF-8, which is not true for UTF-16

The JavaScript case is the one that produces the most bugs. A string containing an emoji reports a length of 2 because the character is stored as a surrogate pair, and reversing it splits the pair. Iterating with codePointAt or spreading the string into an array avoids the split.

Common mistakes

  • Entering a hex value where decimal is expected: typing E9 fails, enter 233 instead
  • Assuming U+00E9 is one byte because it fits in 8 bits of hex
  • Confusing the codepoint with the glyph: several codepoints can combine into one visible character
  • Reading the U+ number as the UTF-8 byte count, which only holds for values below 128
  • Forgetting that the tool clamps anything above 1,114,111 back to the maximum

Surrogates and the edge of the range

The range 0xD800 to 0xDFFF is reserved for UTF-16 surrogate pairs, so those 2,048 values are not valid standalone characters even though they are inside the numeric limits. UTF-8 encoders must reject them. If you are generating codepoints programmatically, skip that band; this calculator will still encode one, but strict decoders will treat the result as malformed.

Precision and rounding

Codepoints are integers, and the calculator floors any fractional input before converting, so 233.9 becomes 233. That is safe here because all values stay well under 253, the exact-integer limit of a double. The only rounding that ever enters is the padding to four hex digits, which is display convention and never changes the value.

Frequently asked questions

What is a Unicode codepoint?

The numeric identity of a character in the Unicode standard, written in hex with a U+ prefix. U+00E9 is decimal 233, the letter é, and it encodes as two bytes in UTF-8.

How do I convert a codepoint to hex?

Divide the decimal value by 16 repeatedly and read the remainders upward. 233 gives 14 remainder 9, and 14 is E, so the result is E9 and the formal notation is U+00E9.

How many bytes does a codepoint use in UTF-8?

One byte up to 127, two up to 2,047, three up to 65,535, and four up to 1,114,111. The default 233 therefore takes exactly 2 bytes.

Why is U+00E9 two bytes when it fits in one?

UTF-8 is not a fixed-width packing of the codepoint. Values from 128 to 2,047 use a two-byte template with 11 payload bits, so 233 becomes C3 A9 even though it would fit in a single 8-bit value in Latin-1.

What are the UTF-8 bytes for a euro sign?

E2 82 AC, three bytes, for codepoint U+20AC or decimal 8,364. Anything in the 2,048–65,535 range takes three bytes.

How many bytes is an emoji in UTF-8?

Four. Emoji sit above 65,536, for example U+1F600 at decimal 128,512, which encodes as F0 9F 98 80.

Why does JavaScript say an emoji has length 2?

JavaScript strings are sequences of UTF-16 units, and characters above 65,535 need a surrogate pair. The emoji is one codepoint but two UTF-16 units, so .length reports 2 while the UTF-8 byte count is 4.

What happens if I enter a number above 1,114,111?

The calculator clamps it to 0x10FFFF, the highest valid codepoint. The same clamp applies below zero, where any negative input becomes 0.

Is a codepoint the same as a character?

Not always. A single visible glyph such as an accented letter or a flag emoji can be several codepoints combined, so counting codepoints can overstate what a reader sees as one character.

Method and sources

Calculation basis

Conversions and formats follow the relevant IETF RFCs and IEEE standards, including RFC 4648 for Base64 and RFC 791 for IPv4 addressing.

Last updated: November 17, 2026
Formula & data sources
  • Unicode codepoint ↔ hex identity; UTF-8 encoding uses 1–4 bytes by codepoint range.

Cite this page

Reference formats
APA 7CalcSeed. (2026, November 17). Unicode Codepoint Calculator. https://calcseed.com/c/developer/unicode-codepoint-calculator/
MLA 9"Unicode Codepoint Calculator." CalcSeed, 17 Nov. 2026, calcseed.com/c/developer/unicode-codepoint-calculator/.
ChicagoCalcSeed. "Unicode Codepoint Calculator." Last modified November 17, 2026. https://calcseed.com/c/developer/unicode-codepoint-calculator/

Related calculators

More Developer calculators