ASCII converter

Convert 7-bit ASCII text to decimal, hexadecimal, or binary codes, and decode codes back to text.

Enter up to 10,000 ASCII characters. Spaces, punctuation, tabs, and line feeds are included.

The text box normalizes pasted CR and CRLF line endings to LF. Use Decode with numeric codes to represent CR separately.

ASCII codes


  

Codes are separated by one space. Copy copies the code sequence.

ASCII and invisible characters

ASCII defines values from 0 through 127. Accented letters, non-Latin scripts, emoji, and combining marks are rejected. Values above 127 need a specified encoding or code page; there is no single universal extended ASCII. This is a text representation, not encryption.

In Decode mode, the preview shows control codes 0 through 31 and DEL (127) as \x00 through \x1F and \x7F. A literal backslash is displayed as \\. For example, tab is \x09, LF is \x0A, and CR is \x0D. These escapes are display notation, not accepted numeric input.

Copy decoded text sends the underlying characters to the clipboard, including controls. The clipboard or destination application may change line endings or omit controls. Selecting the preview manually copies its visible escapes instead.

Accepted code format

Separate codes with spaces, tabs, CR, or LF. Leading and trailing separators are allowed. Decimal tokens have 1 to 3 digits; hexadecimal tokens have 1 or 2 digits, in either letter case; binary tokens have exactly 7 or 8 bits. Every token must represent 0 through 127. Signs, commas, prefixes such as 0x, and joined code sequences are rejected.

Encoding produces unpadded decimal, two-digit uppercase hexadecimal, or seven-bit binary. Up to 10,000 characters or codes can be converted at once. Numeric input is limited to 90,000 characters; output and escaped previews are capped at 80,000 characters. Conversion runs in your browser without sending the input to a server.

The code values follow RFC 20: ASCII format for Network Interchange. Its example letter K is decimal 75, hexadecimal 4B, and binary 1001011.