Skip to content

Text to Hex Converter

Type or paste text to see its bytes in hex, two digits per byte, as they would sit in a file or a network packet.

v2026.10.07

Stays in your browser; it isn’t added to the page address.

Convert to
Outputa space between bytes

In hex

48 69 2C 20 63 61 66 C3 A9

8 characters, 9 bytes in UTF-8.

How this works: Method, 1 source, Checked against 1 worked example,

How this works

Method

Each character is first encoded as bytes, ASCII for plain English and UTF-8 for everything else, and each byte is written as two hex digits from 00 to FF. Hex is how editors, debuggers and network tools show raw text. Full method

How it’s tested

One worked example for this page is checked by automated tests before every release: given the inputs, the tool must show the expected answer.

Privacy

On your device. Nothing you enter or open leaves this browser. About privacy labels

Changes

  • Rebuilt with 18 conversion pages, including text to binary and hex, two’s complement, IEEE 754 floating point, a bitwise calculator and Roman numerals, each with its method and a table.
  • Added key facts with worked examples of converting between bases.
  • Redesigned: the working shown step by step, and the same number in the other common bases under the answer.
  • Fixed large numbers: values above 2^53, such as 64-bit hex, now convert exactly instead of rounding.
  • First published.

Every change on What’s new

How we make toolsReport a mistake

How text becomes hex

Each character is first encoded as bytes, ASCII for plain English and UTF-8 for everything else, and each byte is written as two hex digits from 00 to FF. Hex is how editors, debuggers and network tools show raw text.

For “Hi!”: H = 0x48, i = 0x69, ! = 0x21, so the hex is 48 69 21. A useful pattern: capitals run from 41 (A) to 5A (Z), small letters from 61 (a) to 7A (z), and digits from 30 (0) to 39 (9), so a digit’s hex is just 3 in front of it.

In code you often need the bytes written as escapes: \x48\x69 in C or Python strings, or %48%69 in URLs. Copy the spaced form and replace the spaces with the escape you need.

character → UTF-8 bytes → two hex digits per byte

  • Unicode assigns every character a code point written U+ and hex digits, such as U+00E9 for é; UTF-8 stores it as C3 A9. Source: The Unicode Standard.

Printable ASCII characters in hex

All 95 printable ASCII characters, from the space (20) to the tilde (7E).

All 95 printable ASCII characters, from the space (20) to the tilde (7E).
HexCharacterDecimal
20space32
21!33
22"34
23#35
24$36
25%37
26&38
27'39
28(40
29)41
Show all 95 rows
2A*42
2B+43
2C,44
2D-45
2E.46
2F/47
30048
31149
32250
33351
34452
35553
36654
37755
38856
39957
3A:58
3B;59
3C<60
3D=61
3E>62
3F?63
40@64
41A65
42B66
43C67
44D68
45E69
46F70
47G71
48H72
49I73
4AJ74
4BK75
4CL76
4DM77
4EN78
4FO79
50P80
51Q81
52R82
53S83
54T84
55U85
56V86
57W87
58X88
59Y89
5AZ90
5B[91
5C\92
5D]93
5E^94
5F_95
60`96
61a97
62b98
63c99
64d100
65e101
66f102
67g103
68h104
69i105
6Aj106
6Bk107
6Cl108
6Dm109
6En110
6Fo111
70p112
71q113
72r114
73s115
74t116
75u117
76v118
77w119
78x120
79y121
7Az122
7B{123
7C|124
7D}125
7E~126

Frequently Asked Questions

What is “A” in hex?

Capital A is 41 in hex (65 in decimal), and small a is 61. The difference, 20 in hex, is the one bit that sets the case.

Why is my hex output longer than my text?

Every byte takes two hex digits, and characters outside ASCII take two to four bytes in UTF-8. So “é” becomes C3 A9, four hex digits for one character.

How do I get hex without spaces?

Switch the separator to None under the result. The bytes are then written as one run, such as 486921, which most tools accept as well.