User Rating 0.0 โ˜…โ˜…โ˜…โ˜…โ˜…
Total Usage 0 times
Results will appear here after conversion.
Is this tool helpful?

Your feedback helps us improve.

โ˜… โ˜… โ˜… โ˜… โ˜…

About

EBCDIC (Extended Binary Coded Decimal Interchange Code) is an 8-bit character encoding used primarily on IBM mainframe and midrange systems. Unlike ASCII, which dominates modern computing, EBCDIC arranges letters non-contiguously: A - I occupy positions 0xC1 - 0xC9, J - R sit at 0xD1 - 0xD9, and S - Z at 0xE2 - 0xE9. A single misinterpreted byte during mainframe data migration can corrupt entire records in COBOL copybooks, JCL streams, or VSAM datasets. This tool implements IBM Code Page 037 (CP037), the most common EBCDIC variant used in US/Canada/Europe Latin-1 environments.

The converter accepts raw binary strings in 8-bit groups and maps each octet to its CP037 character representation. It also operates in reverse: given EBCDIC-printable text, it produces the corresponding binary sequence. Note that control characters (positions 0x00 - 0x3F) have no printable glyph and are rendered as placeholders. This tool does not handle DBCS (Double-Byte Character Set) extensions or code page 500/1047 variants.

binary ebcdic converter ibm mainframe code-page-037 encoding

Formulas

Binary to EBCDIC conversion is a direct lookup operation. Each group of 8 binary digits represents one byte in the range 0 - 255. That byte is used as an index into the IBM Code Page 037 character table.

decimal = 7โˆ‘i=0 bi ร— 27 โˆ’ i

Where bi is the i-th bit (left to right, 0-indexed) of the 8-bit binary string. The resulting decimal value is then mapped:

char = CP037[decimal]

For the reverse direction (text to binary), each character c is located in the CP037 table to find its index idx, then converted back to an 8-bit binary string by computing each bit position. Characters not present in CP037 are flagged as unmappable. The hexadecimal representation is derived by grouping each 4-bit nibble: the high nibble = floor(decimal รท 16) and the low nibble = decimal mod 16.

Reference Data

CharacterEBCDIC Hex (CP037)EBCDIC DecimalBinaryASCII Hex
Space0x4064010000000x20
00xF0240111100000x30
10xF1241111100010x31
20xF2242111100100x32
30xF3243111100110x33
40xF4244111101000x34
50xF5245111101010x35
60xF6246111101100x36
70xF7247111101110x37
80xF8248111110000x38
90xF9249111110010x39
A0xC1193110000010x41
B0xC2194110000100x42
C0xC3195110000110x43
D0xC4196110001000x44
E0xC5197110001010x45
F0xC6198110001100x46
G0xC7199110001110x47
H0xC8200110010000x48
I0xC9201110010010x49
J0xD1209110100010x4A
K0xD2210110100100x4B
L0xD3211110100110x4C
M0xD4212110101000x4D
N0xD5213110101010x4E
O0xD6214110101100x4F
P0xD7215110101110x50
Q0xD8216110110000x51
R0xD9217110110010x52
S0xE2226111000100x53
T0xE3227111000110x54
U0xE4228111001000x55
V0xE5229111001010x56
W0xE6230111001100x57
X0xE7231111001110x58
Y0xE8232111010000x59
Z0xE9233111010010x5A

Frequently Asked Questions

Both are EBCDIC variants, but they differ in the placement of certain special characters. CP037 is the standard for US, Canada, Netherlands, Portugal, and Brazil. CP500 (International Latin-1) swaps the positions of characters like the exclamation mark (0x5A in CP037 vs 0x4F in CP500) and square brackets. If you are working with international IBM mainframe data from Western Europe, verify which code page was used during data creation. Using the wrong page will silently corrupt special characters while leaving letters and digits intact.
EBCDIC evolved from punched card encoding used on IBM System/360 in 1964. Punched cards used a zone-digit scheme: letters A - I use zone 12 (hex 0xC_), J - R use zone 11 (hex 0xD_), and S - Z use zone 0 (hex 0xE_). This creates gaps in the code point sequence. Practically, this means simple range checks like c โ‰ฅ 0xC1 โˆง c โ‰ค 0xE9 will incorrectly include non-letter characters that fall in the gaps (0xCA - 0xD0 and 0xDA - 0xE1).
EBCDIC positions 0x00 - 0x3F are mostly control characters (NUL, SOH, STX, etc.). This converter displays them as a dot placeholder (ยท) since they have no visual glyph. In mainframe file transfers, these bytes often appear in packed decimal fields or binary data embedded within text records. If your binary input decodes to many control characters, the source data is likely not text but rather COMP-3 packed fields or binary integers, which require numeric unpacking rather than character conversion.
Yes, but indirectly. First enter your text in the EBCDIC-to-Binary direction. The tool maps each character to its CP037 position. However, be aware that not every Unicode or ASCII character has a CP037 equivalent. Characters like curly braces, backslash, and tilde occupy different positions in EBCDIC than in ASCII. The tool will flag unmappable characters. For production file transfers between ASCII and EBCDIC systems, always verify the mapping with a hex dump of a known test record.
EBCDIC is strictly an 8-bit encoding. Each character requires exactly 8 bits. If your input has, for example, 13 bits after stripping whitespace, the tool will reject it and report the remainder. The most common cause is a truncated copy-paste. Verify your source data is complete. Some mainframe dump tools insert line breaks or headers that must be removed before conversion.
No. EBCDIC is a single-byte encoding, so endianness is irrelevant for character data. Endianness only matters for multi-byte numeric fields (halfword, fullword, doubleword) stored on mainframes, which use big-endian byte order. If you are converting binary representations of COMP or COMP-4 fields, you need a numeric converter, not a character converter.