gizmobench
BrowseDaily

ASCII to Hex

Convert ASCII characters and hexadecimal bytes, with a complete ASCII code table below. This page starts in ASCII only mode and refuses characters or bytes outside 0 to 127. Swap direction to decode hex as ASCII. Controls such as 00, 0A and 0D are real characters that may look blank; the table names them.

Hex12 bytes
48 65 6c 6c 6f 2c 20 77 6f 72 6c 64
Bytes
12
Encoding
Separator
Case

Hex ready. 12 bytes from 12 characters. ASCII, lower case, separated by a space.

12 bytes from 12 characters. ASCII, lower case, separated by a space.

  • Hello, worldUTF-8
    48 65 6c 6c 6f 2c 20 77 6f 72 6c 64
  • Emojione 4-byte code point
    “😀” (U+1F600) at character 1 is outside ASCII, which covers only the first 128 characters. Switch the encoding to UTF-8 to convert it, where it becomes 4 bytes.
  • Odd-length hex indecode
    That is 3 hex digits, an odd number. Every byte is two digits, so one digit is missing or one is extra: check the end of what you pasted.
What the bytes are. Text on both sides of this page is UTF-8: the encoding the web, and almost every file and database written this century, uses. One character is one byte only for the first 128 characters, the ones ASCII covers. An accent is two bytes, most CJK characters are three, and an emoji is four, which is why the byte count sits next to the result rather than being left for you to work out. ASCII only is the same encoder with a refusal attached: anything that would take more than one byte stops the conversion and says which character it was, instead of being widened without telling you. Hex coming in is read the same way whatever the separator setting says, so spaces, commas, colons, hyphens and 0x prefixes all work, and a byte that is not valid UTF-8 is named with its position rather than turned into a replacement character.

Up to 1,000,000 characters in one pass, converted here in your browser with nothing uploaded. Up to 100,000 characters of what you type is kept in this browser alone so it is still here when you come back, and the Start over button above forgets it.

Accuracy. Exact byte-for-byte conversion. Text is encoded as UTF-8 before it is shown as hex, so a character outside ASCII becomes more than one byte, and the byte count says so.

Complete ASCII to hexadecimal and binary table

ASCII has 128 values, from 0 through 127. Control abbreviations name non-printing characters; this table does not include extended ASCII or a legacy code page.

DecimalHexBinary byteCharacter
00000000000NUL
10100000001SOH
20200000010STX
30300000011ETX
40400000100EOT
50500000101ENQ
60600000110ACK
70700000111BEL
80800001000BS
90900001001HT
100A00001010LF
110B00001011VT
120C00001100FF
130D00001101CR
140E00001110SO
150F00001111SI
161000010000DLE
171100010001DC1
181200010010DC2
191300010011DC3
201400010100DC4
211500010101NAK
221600010110SYN
231700010111ETB
241800011000CAN
251900011001EM
261A00011010SUB
271B00011011ESC
281C00011100FS
291D00011101GS
301E00011110RS
311F00011111US
322000100000Space
332100100001!
342200100010"
352300100011#
362400100100$
372500100101%
382600100110&
392700100111'
402800101000(
412900101001)
422A00101010*
432B00101011+
442C00101100,
452D00101101-
462E00101110.
472F00101111/
4830001100000
4931001100011
5032001100102
5133001100113
5234001101004
5335001101015
5436001101106
5537001101117
5638001110008
5739001110019
583A00111010:
593B00111011;
603C00111100<
613D00111101=
623E00111110>
633F00111111?
644001000000@
654101000001A
664201000010B
674301000011C
684401000100D
694501000101E
704601000110F
714701000111G
724801001000H
734901001001I
744A01001010J
754B01001011K
764C01001100L
774D01001101M
784E01001110N
794F01001111O
805001010000P
815101010001Q
825201010010R
835301010011S
845401010100T
855501010101U
865601010110V
875701010111W
885801011000X
895901011001Y
905A01011010Z
915B01011011[
925C01011100\
935D01011101]
945E01011110^
955F01011111_
966001100000`
976101100001a
986201100010b
996301100011c
1006401100100d
1016501100101e
1026601100110f
1036701100111g
1046801101000h
1056901101001i
1066A01101010j
1076B01101011k
1086C01101100l
1096D01101101m
1106E01101110n
1116F01101111o
1127001110000p
1137101110001q
1147201110010r
1157301110011s
1167401110100t
1177501110101u
1187601110110v
1197701110111w
1207801111000x
1217901111001y
1227A01111010z
1237B01111011{
1247C01111100|
1257D01111101}
1267E01111110~
1277F01111111DEL

Common questions

Why is é two bytes of hex and not one?
Because the text is encoded as UTF-8, which is what files, web pages, databases and network connections actually hold. In UTF-8 the first 128 characters take one byte each and everything else takes two, three or four, so é is c3 a9. A converter that shows e9 for é is using Latin-1, one byte per character, which is a different thing and will not match the bytes in your file. The byte count next to the result is there so the difference is visible.
What does "an odd number of hex digits" mean?
Every byte is exactly two hex digits, so a valid string of hex has an even number of them. An odd count means one digit is missing or one is extra, usually from a copy that clipped the end. Nothing is padded with a zero or trimmed to fit here, because either guess would hand you a byte you never had: the conversion stops and says how many digits it counted.
Does it accept hex with 0x prefixes, commas or colons?
Yes. Hex going in can be separated by spaces, commas, colons, semicolons, hyphens, underscores or line breaks, can carry an 0x or a backslash x in front of each byte, and can run together with nothing between the bytes at all. Mixed forms work too. Anything that is not a hex digit or a separator is named with its position instead of being skipped. On the way out you choose the separator and whether the digits are lower case or upper case.
What happens if the hex is not valid UTF-8?
It is refused, with the byte, its position and the rule it breaks. A continuation byte with nothing to continue, a sequence that stops in the middle of a character, a value written the long way round, a surrogate half and a value above U+10FFFF each get their own message. Most tools hand back U+FFFD in place of the bad byte, which looks like a successful conversion of text you never had, so this one stops instead.
What is ASCII only mode for?
It is the same encoder with a refusal attached, for when you need to know the text is plain. In ASCII only mode any character that would take more than one byte stops the conversion and is named, and any byte above 0x7f in hex you paste is refused the same way. Switch the encoding back to UTF-8 and the same input converts.
How much can I convert, and does anything leave my computer?
Up to 1,000,000 characters in one pass, which is the point past which rebuilding the output on every keystroke stops feeling like typing. Past it the input is refused with its own size quoted and nothing is cut off. The conversion is arithmetic that runs in your browser: nothing is uploaded, there is no account, and up to 100,000 characters of what you type is kept in this browser alone so it is still there when you come back. The Start over button forgets it.
How do I convert hex to text or decode a compact hex string?
Swap direction to read hex and write text, or open Hex to Text. 4869, 48 69 and 0x48 0x69 each decode to Hi. Whitespace and recognized separators separate bytes; arbitrary characters, incomplete hex pairs and invalid UTF-8 are refused.
Can I look up ASCII characters, controls and hexadecimal codes?
ASCII to Hex includes the complete 0 to 127 ASCII table, with decimal, hexadecimal and binary byte values. 41 is A, 20 is a space, 0A is a line feed and 0D is a carriage return. Controls may look blank when decoded; the table names them. A0 is not an ASCII byte: a non-breaking space in UTF-8 is C2 A0.
Is this the same as hex to decimal, a hex dump editor or Unicode code-point conversion?
This tool converts text bytes. Number Base Converter converts an integer such as FF to 255. Unicode Character Picker looks up code points. This page does not parse hex dumps with offset or ASCII columns, edit binary files, process packet captures, infer UTF-16 or legacy encodings, generate decryption keys, or provide code in a programming language.
Do preset pages replace my remembered settings?
Only choices you explicitly change are saved. An ASCII or decoding preset does not overwrite a remembered separator, letter case or other mode. Drafts record their own direction so a hex draft is not silently restored as ordinary text on a different preset.

Exact byte-for-byte conversion. Text is encoded as UTF-8 before it is shown as hex, so a character outside ASCII becomes more than one byte, and the byte count says so.