All Tools
Tools/Character Encoding Converter
🔤
UtilitiesAvailable

Character Encoding Converter

Convert between ASCII / Latin-1, EBCDIC (IBM code page 037), and hex. Mainframe-hosted payment systems encode text in EBCDIC — digits become 0xF0–0xF9 instead of 0x30–0x39.

Follows IBM CCSID 37 (EBCDIC CP037)·verified Oct 2026· double-checked Oct 2026— all 256 bytes match Python cp037 and glibc iconv IBM037; CP500 / CP1047 differences from iconv

→
—
About EBCDIC (CP037)

EBCDIC (Extended Binary Coded Decimal Interchange Code) is an 8-bit character encoding developed by IBM for mainframes and mid-range systems. It is completely different from ASCII — the same byte value means a different character in each encoding.

  • Digits: In EBCDIC, digits 0–9 map to bytes 0xF0–0xF9 (not ASCII 0x30–0x39). This is a common source of bugs when porting legacy payment code.
  • Letters: Uppercase A–I are 0xC1–0xC9; J–R are 0xD1–0xD9; S–Z are 0xE2–0xE9. Lowercase follows similar discontiguous ranges.
  • Gaps: The letter runs are not contiguous — the bytes between them hold accented letters and symbols (e.g. 0x8F = ±, 0xCB = ô), so ASCII-style range checks and c - 'A' arithmetic break.
  • Payment usage: Mastercard IPM clearing files (EBCDIC, commonly read as CP500) and many mainframe-hosted ISO 8583 interfaces, switches and batch files carry their character data in EBCDIC.
  • Code page 037: IBM’s EBCDIC code page for the US and Canada. It covers exactly the Latin-1 (ISO 8859-1) repertoire, one byte per character; characters outside it are written as 0x3F (SUB).
  • Other code pages: CP500 and CP1047 move only a few punctuation bytes. CP500 (International) differs from CP037 at 0x4A 0x4F 0x5A 0x5F 0xB0 0xBA 0xBB ([ ! ] ^ ¢ ¬ | instead of ¢ | ! ¬ ^ [ ]); CP1047 (z/OS Unix) puts [ ] ^ at 0xAD 0xBD 0x5F and moves ¬ Ý ¨ to 0xB0 0xBA 0xBB. Bytes for letters, digits and most punctuation are the same in all three. National pages differ more: CP273 (German), CP277 (Danish/Norwegian), CP278 (Finnish/Swedish), CP280 (Italian), CP297 (French) and CP871 (Icelandic) differ from CP037 at 21–25 bytes, and in each of them ! @ [ ] ^ { | } ~ move; CP284 (Spanish) and CP285 (UK) differ at fewer bytes.
Something wrong or missing? Report a problem— we check reports against the specs and fix them.