EBCDIC Table
| Character run | EBCDIC (CP037) | ASCII | Why it sits there |
|---|---|---|---|
| Space | 40 | 20 | the most-reliable fingerprint: EBCDIC space is 0x40, ASCII space is 0x20 |
| Digits 0-9 | F0-F9 | 30-39 | digit nibble is F - the BCD zone inheritance |
| Lowercase a-i | 81-89 | 61-69 | first of three lowercase runs |
| Lowercase j-r | 91-99 | 6A-72 | second run - a 7-slot gap sits between runs |
| Lowercase s-z | A2-A9 | 73-7A | third run - s deliberately opens on 2, not 1 |
| Uppercase A-I | C1-C9 | 41-49 | first uppercase run, zone nibble C |
| Uppercase J-R | D1-D9 | 4A-52 | second run, zone nibble D |
| Uppercase S-Z | E2-E9 | 53-5A | third run, zone nibble E |
| Char | ASCII | CP037 | CP037 dec | Character name |
|---|---|---|---|---|
| ! | 0x21 | 0x5A | 90 | Exclamation Mark |
| " | 0x22 | 0x7F | 127 | Quotation Mark |
| # | 0x23 | 0x7B | 123 | Number Sign |
| $ | 0x24 | 0x5B | 91 | Dollar Sign |
| % | 0x25 | 0x6C | 108 | Percent Sign |
| & | 0x26 | 0x50 | 80 | Ampersand |
| ' | 0x27 | 0x7D | 125 | Apostrophe |
| ( | 0x28 | 0x4D | 77 | Left Parenthesis |
| ) | 0x29 | 0x5D | 93 | Right Parenthesis |
| * | 0x2A | 0x5C | 92 | Asterisk |
| + | 0x2B | 0x4E | 78 | Plus Sign |
| , | 0x2C | 0x6B | 107 | Comma |
| - | 0x2D | 0x60 | 96 | Hyphen-Minus |
| . | 0x2E | 0x4B | 75 | Full Stop |
| / | 0x2F | 0x61 | 97 | Solidus |
| : | 0x3A | 0x7A | 122 | Colon |
| ; | 0x3B | 0x5E | 94 | Semicolon |
| < | 0x3C | 0x4C | 76 | Less-Than Sign |
| = | 0x3D | 0x7E | 126 | Equals Sign |
| > | 0x3E | 0x6E | 110 | Greater-Than Sign |
| ? | 0x3F | 0x6F | 111 | Question Mark |
| @ | 0x40 | 0x7C | 124 | Commercial At |
| [ | 0x5B | 0xBA | 186 | Left Square Bracket |
| \ | 0x5C | 0xE0 | 224 | Reverse Solidus |
| ] | 0x5D | 0xBB | 187 | Right Square Bracket |
| ^ | 0x5E | 0xB0 | 176 | Circumflex Accent |
| _ | 0x5F | 0x6D | 109 | Low Line |
| ` | 0x60 | 0x79 | 121 | Grave Accent |
| { | 0x7B | 0xC0 | 192 | Left Curly Bracket |
| | | 0x7C | 0x4F | 79 | Vertical Line |
| } | 0x7D | 0xD0 | 208 | Right Curly Bracket |
| ~ | 0x7E | 0xA1 | 161 | Tilde |
EBCDIC - Extended Binary Coded Decimal Interchange Code - is the eight-bit character encoding Wikipedia says is used mainly on IBM mainframe and IBM midrange computer operating systems, devised in 1963 and 1964 by IBM and announced with the release of the IBM System/360 line of mainframe computers. It is eight bits developed separately from seven-bit ASCII, and its family tree explains every weird number in the chart below: it descended from the code used with punched cards and the corresponding six-bit binary-coded decimal code used with most of IBM’s computer peripherals of the late 1950s and early 1960s.
The first chart shows the consequence: letters run in three separate segments per case (a-i, j-r, s-z with zone nibbles 8, 9, A) and digits keep their BCD zone (0-9 lives at 0xF0-0xF9, upper nibble F), while ASCII puts each alphabet in one contiguous run. The second chart maps all 31 ASCII punctuation characters into CP037, the US/Canada EBCDIC code page - and shows how far punctuation travels: the exclamation mark lands at 0x5A, the dollar sign at 0x5B, the quotation mark all the way up at 0x7F. Space is 0x40 in EBCDIC versus 0x20 in ASCII - the single most reliable fingerprint when identifying unknown files.
Every value here is generated from Microsoft and Unicode’s published CP037 mapping and byte-verified, not transcribed. The encoding matters in 2026 because z/OS mainframes still run banking, airline and government batch workloads natively in EBCDIC - while IBM’s own AIX and Linux on Z use ASCII, so the boundary is real and file-level. For the ASCII side of every row, the ASCII table on this site lists the full 128-character set, and the text-to-binary converter shows either encoding bit for bit.
How to use
- Identify an unknown file in two bytes: open it in a hex viewer and look at where spaces (0x40 vs 0x20) and capital letters (0xC1-0xE9 vs 0x41-0x5A) fall. Both charts above give you the byte-level fingerprint; if letters cluster in the C-E zone, you are looking at EBCDIC.
- Convert field data using the punctuation chart: legacy mainframe reports and COBOL-era files use CP037 punctuation positions (for example, decimal points at 0x4B and commas at 0x6B). Mapping through this table restores the ASCII positions before any text processing.
- Never assume one EBCDIC: confirm the exact code page (037 for US/Canada, 500 international, 1047 on z/OS Unix services) before bulk conversion - the variants disagree on exactly the punctuation and bracket characters scripts depend on. The official CP037 mapping this chart is generated from is published by Microsoft and Unicode.
Frequently asked questions
Why are EBCDIC letters not contiguous?
Because the letters were laid down as three separate runs per case, each in a different zone nibble: a-i in 0x81-0x89, j-r in 0x91-0x99, s-z in 0xA2-0xAA (uppercase the same with zones C, D, E). The chart above lists every run with its ASCII counterpart. The practical casualty is arithmetic: Wikipedia’s compatibility section notes that the C loop for (c = 'A'; c <= 'Z'; ++c) putchar(c); would print the letters from A to Z if ASCII is used, but print 41 characters on EBCDIC - the gaps between runs get traversed too.
Is EBCDIC still used in 2026?
Yes, in a specific fortress: IBM z/OS mainframes - the systems running core banking, airline reservations and government batch workloads - remain EBCDIC-native. Wikipedia is precise about the boundary though: IBM AIX, Linux on IBM Z and Linux on Power all use ASCII, as does everything running on the IBM PC line. So EBCDIC lives inside classic z/OS subsystems and the file interfaces around them, and almost nowhere else.
How do I tell whether a file is EBCDIC or ASCII?
Check the spaces and the letters. A text file whose every space is byte 0x40 is EBCDIC (ASCII space is 0x20); a file whose letters concentrate in 0xC1-0xE9 is EBCDIC uppercase (ASCII uppercase lives at 0x41-0x5A). Punctuation is the third tell - in CP037 the exclamation mark is 0x5A and the dollar sign 0x5B, positions that hold entirely different characters in ASCII, as the punctuation chart above shows byte for byte.
How many EBCDIC variants are there?
More than anyone wants: the Jargon File’s entry says it exists in at least six mutually incompatible versions, all featuring such delights as non-contiguous letter sequences and the absence of several ASCII punctuation characters fairly important for modern computer languages. The famous ones are code pages 037 (US/Canada - the one charted here), 500 (international), 1047 (Unix services on z/OS) and the euro-era 1140-family. Always confirm the exact code page before converting.
What is the newline situation in EBCDIC?
Different from ASCII by design: CP037 maps byte 0x15 to NL, which Unicode records as NEXT LINE (NEL, U+0085) - not the ASCII line feed U+000A. Microsoft’s CP037 mapping and Unicode’s documentation both flag the mismatch: translating EBCDIC to ASCII code-for-code will not produce Unix-style line breaks, which is why mainframe file transfers have their own newline conventions.