EBCDIC to Text Converter
EBCDIC to Text Converter. Paste your bytes into EBCDIC Hex Input and the EBCDIC to Text Converter instantly decodes your Text Output. If you're deciding whether a color swap is noticeable, the color difference calculator scores the gap between Hex Color A and Hex Color B.
Got a dump from a bank's batch job where every line looks like C9 D5 E5 D6 C9 C3 C5? An EBCDIC to text converter turns that hex input into readable characters, so Extended Binary Coded Decimal Interchange Code from an IBM mainframe stops being a wall of binary-looking symbols. The free online tool also encodes a string the other way when a legacy computer expects it.
How the EBCDIC to Text Converter Works
Every EBCDIC converter does one thing: it consults a mapping. EBCDIC is an 8-bit character encoding, so each value runs from 00 to FF, and each one stands for a single letter, digit, symbol or control code. The tool reads your hexadecimal values, finds each in the selected page, and prints the matching character. When a design needs a semi-transparent brand color, the hex color opacity calculator generates the correct alpha-channel hex value automatically.
A full conversion is a lookup, not arithmetic, but the layout of capital letters follows a pattern worth knowing. They live in three blocks, and a letter's value is the block's base plus its position inside the block:
$$\text{byte}_{16} = \text{base}_{16} + n$$Here n counts from 0, and the base is C1 for A–I, D1 for J–R and E2 for S–Z. N is the fifth letter of the J–R block, so it lands on D1 + 4 = D5, the second pair in the opening example.
Behind the scenes the tool holds each page's code assignments as a lookup table, a fixed list of 256 entries. That is why the text output is exact rather than guessed, and why the same hex input always yields the same readable text. Plain EBCDIC encoding has no checksum or marker that names its page, so the choice is always yours to make, and mainframe data that came from several sources may need more than one pass. You can encode a reply in the same sitting once you know which page you are dealing with.
What you do in the tool
- Paste your hex string, with or without spaces between pairs.
- Choose the page that matches the system the file came from.
- Click the Convert button to read the decoded output.
Decoding Hex to EBCDIC Step by Step
Take this made-up record from a payroll extract: D7 C1 E8 40 F1 F2 F3 F4 4B F5 F0. Working through it against EBCDIC 037 shows the converter's logic without trusting a black box. Paste your hex bytes into the hex crc-32 calculator and the CRC-32 Checksum (Hex) field returns the computed value.
- Split the string into pairs: D7, C1, E8, 40, F1, F2, F3, F4, 4B, F5, F0.
- Look each pair up: D7 is P, C1 is A, E8 is Y and 40 is a space.
- Digits sit in the F0–F9 range, so F1 F2 F3 F4 reads 1234, 4B is the decimal point and F5 F0 reads 50.
- Join the characters: PAY 1234.50.
| Character | ASCII hex | EBCDIC 037 hex | Group |
|---|---|---|---|
| P | 50 in ASCII | D7 | J–R block |
| A | 41 in ASCII | C1 | A–I block |
| Y | 59 in ASCII | E8 | S–Z block |
| Space | 20 in ASCII | 40 | Spacing |
| 1 | 31 in ASCII | F1 | Digits |
| . | 2E in ASCII | 4B | Punctuation |
EBCDIC to ASCII Differences That Make Files Unreadable
You cannot open a mainframe file in a normal editor because EBCDIC to ASCII is not a shift or an offset. ASCII packs the alphabet into one run, while EBCDIC kept the gaps of its punched cards. The letter I is C9 and J is D1, so seven values sit unused between them, which is why the layout is called non-contiguous. The result looks unreadable until a converter maps it.
| Property | ASCII | EBCDIC |
|---|---|---|
| Width | 7-bit, extended ASCII uses 8 | 8-bit |
| Uppercase A | 41 in ASCII | C1 |
| Lowercase a | 61 in ASCII | 81 |
| Digit 0 | 30 in ASCII | F0 |
| Space | 20 in ASCII | 40 |
| Alphabet layout | One continuous ASCII run | Three separate blocks |
| Typical platform | Unix, Windows and the web | IBM mainframe and midrange |
The gap explains a classic bug. A routine that tests whether a value is a letter by checking one continuous range accepts punctuation and rejects real letters once the input is EBCDIC. A converter avoids that by using the full conversion table for the chosen page instead of a range rule.
Control codes and lowercase
The first 64 positions hold control codes such as line feed and carriage return. The converter decodes them to non-printing characters, so a record may look shorter than its hex, and their positions differ from an ASCII table. Lowercase hex such as 81, 91 and A2 decodes to a, j and s, the start of each lowercase block. Digits F0 to F9 run in order, so numbers survive a careless conversion better than names do.
Padding gives you a quick check on the converter's result. Fixed-width fields stay aligned, so trailing spaces pasted as a run of 40 values decode to blanks before the next field, a sign you picked the right page; the wrong encoding rarely produces such clean padding.
Choosing the Right EBCDIC Code Page
EBCDIC is a family, not a single standard. Each code page swaps a handful of values for local letters and symbols, so a wrong choice leaves letters and digits perfect while silently corrupting punctuation. The family covers many code pages, but a few cover nearly everything you meet.
| Code page | Region | Where you meet it |
|---|---|---|
| EBCDIC 037 | North America | The default for US and Canadian z/OS mainframe files |
| EBCDIC 500 | International | Multilingual z/OS dumps and Swiss or Belgian feeds |
| EBCDIC 273 | Germany and Austria | German variant with umlauts |
| EBCDIC 1047 | Open systems | z/OS UNIX and C source, where square brackets matter |
Which page is it?
Ask the mainframe administrator, or read the DD statements in the JCL that produced the file. When nobody knows, select cp037 in the converter, paste a short sample, and switch pages until the brackets, the exclamation mark and the vertical bar decode correctly. An opening square bracket shows the difference: 037 stores it as BA, while cp1047 stores it as AD. Currency symbols and accented characters shift too, as does the euro sign, which needs a newer variant such as 1140 because the original pages have no slot for it.
Reading an Account Reference Field with an EBCDIC Decoder
A credit union analyst is reconciling a nightly extract against a loan system. One record shows a 14-position field in the hex dump, and the copybook says it holds a 13-character account reference followed by a one-character status flag. The dump reads C1 C3 C3 E3 60 F0 F0 F4 F7 F2 F9 F1 F8 5A, and the spec says the flag ! means "closed".
The analyst pastes the 14 pairs into the converter and leaves the page on EBCDIC 037, the North American default for the shop's z/OS partition. The EBCDIC to text conversion returns ACCT-00472918! in one pass: the first four pairs C1 C3 C3 E3 give ACCT, 60 is the hyphen, and F0 through F8 spell 00472918. The last pair, 5A, is the exclamation mark, so the account is closed, exactly as the copybook promised.
Before filing the result, the analyst reruns the same string under EBCDIC 500, the international page used by a sister job. The last character now comes back as ], matching no status in the spec. The same hex decodes to a different flag, so 5A means "closed" only under 037, and the analyst keeps the 037 reading of ACCT-00472918 and asks the sister job to confirm its page.
Converting EBCDIC Text to Hex and Back in Code
The online page suits a single line, but a scheduled job needs a library call. The EBCDIC encoder direction is the same lookup reversed: "INVOICE 4471-B" becomes C9 D5 E5 D6 C9 C3 C5 40 F4 F4 F7 F1 60 C2, which is a valid answer to ASCII to EBCDIC in the 037 page. Going EBCDIC to hex from a file simply prints each stored value as two digits.
Python ships codecs for most pages, so bytes.fromhex("D7C1E840").decode("cp037") returns PAY. Java offers the Cp037 charset, and on z/OS the iconv utility moves files between IBM-037 and others. Node.js needs the iconv-lite package. Always test a short sample first, because a file labelled only "EBCDIC" could be any of dozens of variants.
The converter shows its decoded output as ASCII-compatible text, so accented characters survive when you copy the result into a UTF-8 file as Unicode, while a plain Latin-1 target, formally ISO 8859-1, is what most tools call extended ASCII.
Fixing Problems When You Decode EBCDIC Encoding
Most failures come from the input, not the mapping. Run through this list before you suspect the converter.
- Strip any
0xprefix from each pair; it is not part of the hex value. - Keep the string space-separated or continuous, with an even number of digits, since every character needs exactly two.
- Replace invalid characters such as G–Z in the hex field; a validator that flags them saves guessing.
- If letters look right but punctuation is wrong, switch the page.
- If everything looks like random accented letters, the file may already be ASCII or UTF-8.
Where an EBCDIC Decoder Is Still Needed
EBCDIC remains the character set of IBM mainframe systems such as z/OS, along with AS400 midrange machines. COBOL programs write fixed-width records in it, banking ledgers use it, and government legacy systems still exchange files in it. A decoder earns its place in a few recurring jobs: data migration to modern databases, forensics on archived tapes, debugging a failed batch from a hex dump, and teaching how the System/360 era shaped every computer since.
Whichever of these jobs you have, the converter above handles them: paste the hex, pick the page and read the result, whether you call the tool a translator or a code converter. The encoding descends from punch card codes, and behind every result sit the bits of each stored character, eight per symbol.