Developer Tools
ASCII Code Converter
Convert text to ASCII codes in decimal, hex, octal or binary, or decode codes such as 72 105 back to text. Non-ASCII characters as UTF-8 bytes or code points.
How to use ASCII Code Converter
Type text to get its codes, or paste numbers to turn them back into characters; the direction is detected automatically. Choose the number format, how non-ASCII characters are handled and the separator, and a character table appears below.
- Enter text or codesType Hi! or paste codes such as 72 105 33. Prefixed forms like 0x48, \x48, 0b1001000 and H can be mixed.
- Pick a number formatChoose decimal, hexadecimal, octal or binary, and whether non-ASCII characters become UTF-8 bytes or code points.
- Format and copySet the separator (space, comma, new line, or none for hex and binary), add 0x/0b/0o prefixes if you like, then copy.
ASCII, UTF-8 and characters beyond 127
ASCII defines 128 characters, codes 0 to 127: English letters, digits, punctuation and control characters such as LF and TAB. Anything else is not ASCII. In the default As UTF-8 bytes mode, the pound sign £ is output as two bytes, 194 163 in decimal or C2 A3 in hex, which is how it is stored in a UTF-8 file. Choose As Unicode code points and £ becomes the single value 163 instead. The table lists each character with its decimal, hex and binary value and its UTF-8 bytes, and names control characters such as LF and TAB rather than leaving them invisible.
Decoding codes back to text
In decode mode, unprefixed numbers are read in the chosen format while prefixed ones follow their prefix, so 0x48 \x69 0b100001 ? decodes to Hi!?. With UTF-8 bytes selected, hex can be written without spaces (C2A3 gives £) and binary as continuous 8-bit runs. Any value above 255 is treated as a Unicode code point. Byte sequences that are not valid UTF-8 show as � with a hint to try code point mode, and invisible control characters in the result are counted so they do not slip through unnoticed.
Accuracy and data handling
Validate the result with your project's own tests and runtime rules before using it in production. The calculation runs in your current browser; the tool code does not send the input to a processing API.
FAQ
How do I convert text to hex?
Set Number format to Hexadecimal and Hi becomes 48 69. Tick Add 0x / 0b / 0o prefix to get 0x48 0x69, or choose no separator to get 4869.
Why does one character give two or more numbers?
It is not ASCII, so it is written as its UTF-8 bytes: £ is 194 163, and accented or non-Latin characters take two to four bytes. Choose As Unicode code points for one number per character.
Can automatic detection get it wrong?
Yes, if your text is made only of digits. Input such as 123 is read as a code and decodes to {. Set Direction to Text → codes to encode the digits as characters instead.
More Developer Tools
Related toolsConvert text to Unicode escapes for JS, Python, HTML or CSS, and decode them
Bulk-check email address syntax with reasons, typo hints and a clean list
Break a URL into scheme, host, port, path, parameters and fragment
Parse URL parameters into JSON, or build a query string from JSON
Escape text for use inside a JSON string, or unescape it back to plain text
Look up MIME types by extension, or extensions by MIME type