# Punch Card Decoder / Encoder

Canonical URL: https://offlineutils.com/punch-card-decoder
Category: Codes & Ciphers
Published: 2026-10-13
Publisher: offlineutils.com
Runs entirely in the browser; nothing entered into the tool is uploaded.

> A punch card decoder turns the holes in an 80-column Hollerith card back into text. This one reads a card under every common card code at once — IBM 029, IBM 026, DEC 029 and IBM's full EBCDIC card code — and ranks the readings, so you can solve a card without knowing which keypunch made it, entirely in your browser.

A standard IBM card is 7⅜ by 3¼ inches with 80 columns and 12 rows, and each column holds one character as a pattern of rectangular holes. Digits are a single punch in rows 0 to 9. Letters add a zone punch in one of the three rows at the top — 12, 11 or 0 — so A is 12-1, J is 11-1 and S is 0-2. That much goes back to Herman Hollerith's cards for the 1890 US census, and it is the same on every machine.

Punctuation is where cards disagree, and it's why a card that decodes cleanly in one tool comes out as nonsense in another. IBM's 026 keypunch of 1949 had 48 characters, in two keycap sets: the commercial set read 12 as & and 8-3 as #, the FORTRAN set read the same holes as + and =. The 029 of 1964 moved to EBCDIC's 64 printing characters and reassigned FORTRAN's punctuation, so a FORTRAN deck punched on an 026 reads wrong on an 029. DEC adapted the 029 to ASCII and put [ ] \ and ^ where IBM had ¢ ! ¬ and |. EBCDIC itself defines a punch pattern for all 256 byte values, lowercase and control characters included, which no keypunch could type in one keystroke.

So this tool doesn't ask which code you have. It decodes the card under each one and puts first the reading that explains every column; a column a code has no character for shows as �. Letters and digits read the same everywhere, so readings only differ in their punctuation — and the one whose punctuation makes sense is nearly always right. Every table is checked against an independent published source by an automated test: the IBM 029 is built from the EBCDIC card code and tested against Douglas W. Jones's diagram of the keypunch, and DEC's code against the version in DEC's 1973 handbook.

To copy a card from a photo, click its holes onto the card here, counting columns from the left and rows from the top: 12, 11, then the printed 0 to 9. You can also paste hole notation such as 12-1 11-5 0-8-3, a 12-row grid of O and dots (with or without row labels, so a diagram copied from a reference page works), or one octal or hex number per column as emulators write them. The card can be typed on like a keypunch, too, and downloaded as a PNG or SVG with the interpretation printed along the top edge.

## Features

- Decodes under six card codes at once and ranks them by how many columns each one explains
- IBM 029 with EBCDIC or FORTRAN glyphs, DEC 029, IBM 026 commercial and FORTRAN, and the full EBCDIC card code
- Click holes onto an 80-column card, or type on it like a keypunch
- Reads hole notation, 12-row grids with or without row labels, and octal or hex column codes
- Punches text one line per card and lists any characters the code can't represent
- Downloads the card as PNG or SVG with the interpretation printed along the top
- Every code table checked against an independent published source

## Use cases

- Solving a CTF challenge that hands you an image of a punch card
- Reading an old card found in a book, an archive or a relative's papers
- Making a punch card with your name or a message on it
- Checking how a FORTRAN or COBOL statement would have been punched

## How to use it

1. **Copy the card** — Click each hole onto the card, or paste hole notation, a 12-row grid or octal codes into Read a card. Columns count from the left; rows run 12, 11, then the printed 0 to 9.
2. **Read the results** — Readings lists every code, best match first. A column a code can't read shows as �, and letters and digits are the same in every code.
3. **Check doubtful columns** — Click a column to see its punches and how the selected code reads them. A single misplaced hole usually turns one letter into another or into �.
4. **Punch your own** — Type text, pick a card code and press Punch — one line per card — then download the card as PNG or SVG.

## When to use it, and when to use something else

- **vs The Virtual Keypunch (masswerk.at)** — use Punch Card Decoder / Encoder when you need to decode a card rather than make one, or the card wasn't punched with IBM 029 codes. Use The Virtual Keypunch (masswerk.at) when you want the full keypunch experience, with FORTRAN and COBOL card designs.
- **vs An image-based punch card reader** — use Punch Card Decoder / Encoder when your picture is a photo taken at an angle or in uneven light, or you need to know which code the card uses. Use An image-based punch card reader when you have a straight, high-contrast scan of a card punched in the code the reader expects.
- **vs A decoding script** — use Punch Card Decoder / Encoder when you have one card or a handful and want every code's reading side by side. Use A decoding script when you are processing a whole deck of scanned cards.

## Frequently asked questions

### How do I decode a punch card from a picture?

Copy the holes onto the card here and let it read them. Count columns from the left edge, 1 to 80, and rows from the top: two unprinted rows, 12 and 11, then rows 0 to 9, whose digits are printed on the card. The tool then reads the card under every common code and lists the reading that explains every column first. CTF cards are usually IBM 029 — EKOPARTY CTF 2016's 'Old but gold' handed out fourteen of them.

### What is the difference between IBM 026 and IBM 029 codes?

The holes for letters and digits are identical; the punctuation differs. The 026 of 1949 had 48 characters in two keycap sets, commercial and FORTRAN, which read the same holes differently — 12 was & on one and + on the other. The 029 of 1964 adopted EBCDIC's 64 printing characters and moved FORTRAN's punctuation to new holes, so + went from 12 to 12-8-6. A FORTRAN card punched on an 026 therefore reads wrong under 029 codes.

### Why does a column decode as �?

Because the code you're reading it with has no character for that combination of holes. Usually the card was punched in a different code — check the other readings — or one hole was copied into the wrong row. If many columns fail under every keypunch code, the card may hold binary data; the EBCDIC card code assigns a pattern to all 256 byte values and will read it.

### What is Hollerith code?

The scheme of representing characters as holes in a card column that Herman Hollerith devised for the 1890 US census, and the family of card codes descended from it. Digits are a single punch in rows 0 to 9; letters combine a zone punch in row 12, 11 or 0 with a digit punch; punctuation uses further combinations, usually including row 8. The name is used loosely for any of the IBM-compatible card codes.

### Why are there no lowercase letters on most punch cards?

Because keypunches only had capitals. Lowercase did exist on cards: EBCDIC defines a pattern for every byte, so a is 12-0-1 and j is 12-11-1, but punching one meant pressing the multi-punch key and building the column by hand. DEC's ASCII card code assigns the same patterns. Choose either of those codes to read or punch lowercase.

### What do the octal column codes mean?

They write each column as one 12-bit number, with row 12 as the highest bit and row 9 as the lowest, so 4000 octal is a single punch in row 12 and 4400 is 12-1, the letter A. IBM's column-binary format and card-reader emulators store cards this way. Paste one 4-digit octal or 3-digit hex number per column into Read a card and the tool loads them.

### Can it read a photo of a card automatically?

No. Photos of cards are rarely straight or evenly lit, and a reader that misplaces one hole gives you a confident wrong letter. Clicking 80 columns onto the card takes a few minutes and gets them all right, and the readings update as you go, so a misplaced hole shows up as an odd character straight away.

## Related tools

- https://offlineutils.com/number-base-converter
- https://offlineutils.com/base32
- https://offlineutils.com/quoted-printable
