Home Conversion Number ASCII Text to Hex

ASCII Text to Hex Converter

To use ASCII text to hex converter, type an ASCII value e.g. "King Kong" and click on the Convert button and you will get the hexadecimal converted value "4B 69 6E 67 20 4B 6F 6E 67". Space is also a valid ASCII char and it is converted to hex value of 20 (decimal: 32).

ASCII Text to Hex Conversion:

Hexadecimal = 41 25 43

Why Convert ASCII To Hex

Hex byte "5F" can be expressed as:

(5 × 161) + (15 × 160) = (80 + 15) = 95 (decimal).

How to Convert ASCII Text to Hex

Consider the following steps:

ASCII Text to Hex Examples

Example 1: Convert the text "friend" to hex value.

ASCII Decimal Decimal to Hex Hex
 
f 102 (6×161) + (6×160) = 102 66
r 114 (7×161) + (2×160) = 114 72
i 105 (6×161) + (9×160) = 105 69
e 101 (6×161) + (5×160) = 101 65
n 110 (6×161) + (14×160) = 110 6E
d 100 (6×161) + (4×160) = 100 64
  • Final hex value: (66 72 69 65 6E 64)16
  • Example 2: Convert the text "United States & China" to hex value.

    ASCII Decimal Decimal to Hex Hex
     
    U85(5×161) + (5×160) = 8555
    n110(6×161) + (14×160) = 1106E
    i105(6×161) + (9×160) = 10569
    t116(7×161) + (4×160) = 11674
    e101(6×161) + (5×160) = 10165
    d100(6×161) + (4×160) = 10064
    space32(2×161) + (0×160) = 3220
    S83(5×161) + (3×160) = 8353
    t116(7×161) + (4×160) = 11674
    a97(6×161) + (1×160) = 9761
    t116(7×161) + (4×160) = 11674
    e101(6×161) + (5×160) = 10165
    s115(7×161) + (3×160) = 11573
    space32(2×161) + (0×160) = 3220
    &38(2×161) + (6×160) = 3826
    space32(2×161) + (0×160) = 3220
    C67(4×161) + (3×160) = 6743
    h104(6×161) + (8×160) = 10468
    i105(6×161) + (9×160) = 10569
    n110(6×161) + (14×160) = 1106E
    a97(6×161) + (1×160) = 9761
  • Final hex value: (55 6E 69 74 65 64 20 53 74 61 74 65 73 20 26 20 43 68 69 6E 61)16
  • Example 3: Convert text "Math +-/" to hex value.

    ASCII Decimal Decimal to Hex Hex
     
    M 77 (4×161) + (13×160) = 77 4D
    a 97 (6×161) + (1×160) = 97 61
    t 116 (7×161) + (4×160) = 116 74
    h 104 (6×161) + (8×160) = 104 68
    space 32 (2×161) + (0×160) = 32 20
    + 43 (2×161) + (11×160) = 43 2B
    - 45 (2×161) + (13×160) = 45 2D
    / 47 (2×161) + (15×160) = 47 2F
  • Hex value: (4D 61 74 68 20 2B 2D 2F)16
  • Example 4: Convert text "HI $$/$" to hex value.

    ASCII Decimal Decimal to Hex Hex
     
    H 72 (4×161) + (8×160) = 72 48
    I 73 (4×161) + (9×160) = 73 49
    space 32 (2×161) + (0×160) = 32 20
    $ 36 (2×161) + (4×160) = 36 24
    $ 36 (2×161) + (4×160) = 36 24
    / 47 (2×161) + (15×160) = 47 2F
    $ 36 (2×161) + (4×160) = 36 24
  • Hex value: (48 49 20 24 24 2F 24)16
  • Frequently Ask Questions: ASCII Text to Hex Conversion

    Q1: Can we convert the space to hex value?

    Yes the space can be converted to a hex value of 20 and decimal value of 32.

    Q2: What is the difference between ASCII and Unicode hex conversion?

    Q3: Why is ASCII to hex preferred over binary?

    Hexadecimal is more compact and readable, representing every 4 bits as a single digit. While computers operate in binary, hex offers a more compact and user-friendly way to represent the underlying binary data.

    Q4: How to convert 'A' to hex value?

    Q5: What is the hex representation of newline (\n) or horizontal tab (\t)?

    The newline or line feed (LF) (\n) has the hex ASCII code of "0x0A" (decimal: 10) while the horizontal tab (HT) or (\t) has the hex value of "0x09" (decimal: 09).

    by Wasim Khan and it was last modified on

    Related Conversions

    Please find the related numeric conversions.