This converter translates EBCDIC hex into text and text into EBCDIC hex. It supports seven IBM code pages: 037, 273, 285, 500, 1047, 1140, and 1148. Each page uses the byte-to-character table from the ICU mapping file with the same number (ibm-37, ibm-273, and so on).
Using the converter
The converter runs in your browser. Input is not sent to a server.
EBCDIC hex converter
Text
Hex
The text output shows bytes 15, 25, and 0D as line breaks. Converting it back to hex uses the NL or LF setting, so bytes 25 and 0D can return as 15.
| Offset | EBCDIC | Unicode | Character |
|---|---|---|---|
| 0000 | C8 | U+0048 | H |
| 0001 | C5 | U+0045 | E |
| 0002 | D3 | U+004C | L |
| 0003 | D3 | U+004C | L |
| 0004 | D6 | U+004F | O |
Need this at work?
Free account saves tutorial progress. The jobs board lists openings that ask for JCL.
Space is 40 on all seven pages. Digits 0 through 9 are F0 through F9. Uppercase letters fall into three blocks: A through I are C1 through C9, J through R are D1 through D9, and S through Z are E2 through E9. Lowercase letters use the same three-block layout at 81 through 89, 91 through 99, and A2 through A9. Within each case, byte values still increase alphabetically, but the values have gaps. Across cases, every lowercase letter sorts before every uppercase letter.
The same word uses different bytes in each encoding:
12C8 C5 D3 D3 D6 HELLO on code page 037 48 45 4C 4C 4F HELLO in ASCII
Letters, digits, and the space character use the same bytes on all seven pages. Brackets, the vertical bar, and several national characters do not. To check which page a dump uses, decode the brackets, the pound sign, the dollar sign, or an umlaut and compare the result with the table below.
Byte 0A is not a line break on these code pages. It is a control character. New line is byte 15, which maps to Unicode U+0085 (NEL). Line feed is byte 25, which maps to U+000A. Carriage return is byte 0D. When a file moves between an EBCDIC system and an ASCII system without a code-page conversion, the line breaks are often the first thing that looks wrong.
The text panel shows bytes 15, 25, and 0D as line breaks. The byte table lists the Unicode value for each byte. Copy the hex output when you need the exact bytes.
COMP-3 fields are stored as packed decimal. Each byte holds two digits. The last nibble holds the sign: C for positive, D for negative, and F for unsigned. This converter reads every byte as a character, so a packed field appears as unrelated symbols. Use the COMP-3 converter for those fields. Until a record-level tool is available, separate the character fields from the packed fields by their offsets in the copybook, and convert each part on its own.
Each letter on a mainframe has a number, and that number differs from the number a PC uses. The mainframe stores A as C1. A PC stores A as 41. The converter reads the mainframe number and returns the letter, and it works in reverse. Select the code page that matches the system that wrote the file, because a few symbols have different numbers on different pages.
CODE-SET, character layout, and how COBOL files store EBCDIC bytes.
Sort order, case, and how code pages change the meaning of the same byte.
Two digits per byte and a sign nibble. The same hex read as a number.
How a COBOL file declares the character set used for its records.
The COBOL overview of EBCDIC is on EBCDIC in COBOL. Sort order and code pages in DFSORT are covered on EBCDIC nuances. Other converters and calculators are listed on /tools.