ToolNimba

๐Ÿ”ก Text to Hex Converter with Byte Breakdown

Shihab Mia By Shihab Mia ยท Updated 2026-07-18

Every character becomes a 2-digit uppercase hex value. Characters above U+00FF use as many hex digits as they need.

Hexadecimal output
48 69
Characters
2
Bytes
2
Hex digits
4
Each character with its decimal code point and hexadecimal value
Character Code point Decimal Hex

This text to hex converter turns any text into its hexadecimal code in one step, so Hi becomes 48 69 and A becomes 41. It reads each character, finds its numeric code point, and prints that number in base 16 as a zero-padded, uppercase pair of digits. You get the full hex string, a per-character breakdown, a live byte count, and a copy button, and it all runs in your browser with nothing sent to a server.

What is the Text to Hex Converter?

Computers do not store letters directly. Each character is kept as a number, its code point, defined by a character set such as ASCII or Unicode. The capital letter H is code 72, the lowercase i is code 105, and a space is code 32. Hexadecimal, or base 16, is just a compact way to write those numbers using sixteen symbols: the digits 0 to 9 and then the letters A to F for the values 10 to 15. Converting text to hex means writing each character code in base 16 instead of base 10.

To convert a single character to hex by hand, first look up its code point, then divide by 16. The quotient is the first hex digit and the remainder is the second. Take H, which is 72: 72 divided by 16 is 4 with a remainder of 8, so the hex is 48. Do the same for i, which is 105: 105 divided by 16 is 6 with a remainder of 9, giving 69. Line the results up and Hi becomes 48 69. Every printable ASCII character fits neatly in two hex digits because their codes run from 0 to 127, and a single byte (values 0 to 255) always fits in exactly two hex digits.

The converter above repeats this for every character in your text and joins the results with your chosen separator. A space between bytes (48 69) is the most common and readable form, but you can switch to no separator (4869) for a raw stream, a 0x prefix (0x48 0x69) for code, or commas (48, 69) for lists. It zero-pads every value to at least two digits so the output lines up, and it always uses uppercase A to F unless you pick lowercase. The byte count tells you how many bytes the text takes, and the breakdown table shows the character, its code point, and its hex side by side.

Most everyday text is plain ASCII, where each character is one byte and two hex digits. Accented letters and symbols from the Latin-1 range, such as the copyright sign at code 169, still fit in one byte (A9). Characters beyond that, like the euro sign or an emoji, have larger code points, so the tool prints as many hex digits as the value needs rather than truncating it. Because the whole process is a lookup and a base change, converting text to hex is fully reversible: feed the hex back into a hex to text converter and you get your original text exactly.

When to use it

  • Encoding a short string as hex to paste into source code, a config file, or a URL escape sequence.
  • Inspecting the exact bytes behind text when debugging encoding issues, protocols, or file formats.
  • Learning how ASCII and Unicode map characters to numbers, with a live per-character breakdown.
  • Preparing hex values for hardware, firmware, or hex editors that expect raw byte codes.

How to use the Text to Hex Converter

  1. Type or paste your text into the input box, or tap one of the example buttons.
  2. Read the hexadecimal output at the top; it updates instantly as you type.
  3. Pick a separator (space, none, 0x prefix, or comma) and a letter case to match where you will paste it.
  4. Use the Copy button to grab the hex string, and check the breakdown table to see each character code.

Formula & method

For each character, hex = code point written in base 16, zero padded to at least 2 digits. If the code point is c, the two main digits are floor(c / 16) and c mod 16, mapped to 0-9 and A-F. Example: H is code 72, so 72 = 4x161 + 8x160 = hex 48. Values above 255 use as many hex digits as they need.
Text Hi to HexHicode 72code 10572 / 16 = 4 r 8105 / 16 = 6 r 94869Hi = 48 69

Worked examples

Convert the text Hi to hexadecimal.

  1. Find the code point of each character: H is 72, i is 105.
  2. Convert 72 to base 16: 72 / 16 = 4 remainder 8, so the hex is 48.
  3. Convert 105 to base 16: 105 / 16 = 6 remainder 9, so the hex is 69.
  4. Join the two-digit values with a space.

Result: Hi in hexadecimal is 48 69 (two characters, two bytes).

Convert the text Cat to hexadecimal.

  1. Code points: C is 67, a is 97, t is 116.
  2. C: 67 / 16 = 4 remainder 3, so 43.
  3. a: 97 / 16 = 6 remainder 1, so 61.
  4. t: 116 / 16 = 7 remainder 4, so 74.

Result: Cat in hexadecimal is 43 61 74 (three characters, three bytes).

Common characters with their decimal code and hex value

CharacterDecimal codeHex
space3220
04830
95739
A6541
H7248
Z905A
a9761
i10569
z1227A

Hex digit values (base 16 symbols)

Hex digitDecimal value
0 to 90 to 9
A10
B11
C12
D13
E14
F15

Common mistakes to avoid

  • Forgetting to zero-pad single-digit values. A newline is code 10, which is hex A. Written on its own that is ambiguous, so byte values are padded to two digits as 0A. Always keep each byte at two digits unless the code point genuinely needs more.
  • Mixing up letter case with meaning. Hex 48 and hex 48 mean the same value whether the letters are upper or lower case; case is only cosmetic. Do not assume 4a and 4A are different bytes, they are both decimal 74.
  • Confusing the character with its digit form. The character 0 is code point 48, which is hex 30, not hex 00. The digit you see and the number the computer stores are different things, and text to hex encodes the stored code point.
  • Assuming every character is one byte. ASCII characters are one byte and two hex digits, but symbols and emoji beyond the Latin-1 range have larger code points and need more digits. Do not truncate a long value to two digits or you change the character.

Glossary

Hexadecimal
A base 16 number system using the symbols 0 to 9 and A to F. Two hex digits can represent any single byte, from 00 to FF.
Code point
The number assigned to a character by a character set such as ASCII or Unicode. The letter H has the code point 72.
ASCII
A character set that maps the basic English letters, digits, and punctuation to the codes 0 through 127, each fitting in one byte.
Byte
A unit of 8 bits that holds a value from 0 to 255. One byte is written as exactly two hexadecimal digits.
Zero padding
Adding a leading 0 so a value fills a fixed width, so code 9 is shown as 09 to keep every byte two digits wide.
Unicode
A universal character set that extends ASCII to cover the worlds writing systems, symbols, and emoji, using larger code points.

Frequently asked questions

How do you convert text to hex?

To convert text to hex, replace each character with its code point written in base 16. Look up the code, divide by 16 for the first digit and take the remainder for the second. For Hi that gives 48 69.

What is Hi in hex?

The text Hi is 48 69 in hexadecimal. H has the code point 72 which is hex 48, and i has the code point 105 which is hex 69.

What is the letter A in hex?

The capital letter A has the ASCII code 65, which is hex 41. The lowercase a is code 97, which is hex 61.

Is text to hex the same as ASCII to hex?

For plain English text they are the same, because each ASCII character maps to one byte and two hex digits. Text to hex also handles characters beyond ASCII by using as many hex digits as the code point needs.

How do I turn hex back into text?

Split the hex into pairs of digits, read each pair as a base 16 number to get a code point, then look up the character. A hex to text converter reverses this tool exactly, so 48 69 becomes Hi.

Why are some hex values two digits and others longer?

Any byte value from 0 to 255 fits in two hex digits, which covers all ASCII text. Characters with larger code points, like symbols or emoji, need three or four hex digits to hold the full value.