UTF-8 Byte Encoder
Type any text to see its UTF-8 byte sequence and code points.
Result
How it is calculated
Type or paste any text and the tool reads it as UTF-8 bytes. UTF-8 stores each Unicode code point in 1 to 4 bytes, decided by the leading byte:
0xxxxxxx = 1 byte (U+0000 to U+007F), 110xxxxx = 2 bytes, 1110xxxx = 3 bytes, 11110xxx = 4 bytes
The tool outputs the total byte count, the number of code points, all bytes in uppercase hex separated by spaces, and one line per code point in the form U+XXXX = bytes. The code point value is rebuilt from the data bits of the bytes. Note that the count is of code points, not of visible characters: an emoji built from several code points, or a letter plus a combining accent, counts as more than one.
Worked example
The text is "Café €". C, a, f and the space are plain ASCII, one byte each (43, 61, 66, 20). The é is U+00E9 and takes two bytes, C3 A9. The euro sign € is U+20AC and takes three, E2 82 AC. Total: 1 + 1 + 1 + 2 + 1 + 3 = 9 bytes for 6 characters. The full hex output is 43 61 66 C3 A9 20 E2 82 AC.
Common mistakes
- Assuming one character is one byte. Accented letters take 2 bytes, many Asian characters 3, and emoji 4, so a 100-character message can exceed a 100-byte limit.
- Comparing the byte count with a limit that is actually in UTF-16 units or characters, such as many database column types, instead of bytes.
- Confusing code points with what the eye sees as one character; a flag or a family emoji is several code points joined together.
- Copying text that contains hidden characters such as a non-breaking space or a zero-width joiner; they add bytes that you cannot see.
- Reading the hex as a different encoding. These are UTF-8 bytes, which differ from Latin-1 or UTF-16 bytes for any character above U+007F.
Sources
- RFC 3629: UTF-8, a transformation format of ISO 10646 — IETF, STD 63, 2003
About this calculator
UTF-8 encodes every Unicode code point as 1 to 4 bytes: ASCII characters (U+0000–U+007F) take a single byte, most Latin-extended and common symbols take 2 bytes, most CJK and other BMP characters take 3 bytes, and emoji and rarer characters outside the Basic Multilingual Plane take 4 bytes — which is why a string's byte length can be much larger than its character count once accents, non-Latin scripts, or emoji are involved.
This tool encodes any text to UTF-8 and shows the total byte length, the raw hex bytes, and a per-codepoint breakdown of how each character was encoded. Backend and mobile developers use it to debug byte-length limits in databases, APIs, or SMS/push-notification payloads where character count and byte count diverge, and students learning encoding use it to see the byte structure behind Unicode text firsthand.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments (1)
If an emoji gets dropped or turned into question marks when saved, paste it here and look at the breakdown. A code point above U+FFFF shows four bytes, and some older database setups, such as MySQL's three-byte utf8 character set, cannot store four-byte characters. A two- or three-byte character will not have that problem. Which string is being cut or garbled for you?