NACHA/ACH Parser

Parse NACHA/ACH payment files

1
Understanding NACHA ACH Files
TL;DR

ACH (Automated Clearing House) is the US electronic payment network processing direct deposits, bill payments, and business transfers — over 30 billion transactions per year.

What is ACH?

The Automated Clearing House (ACH) is the electronic funds transfer network that handles the majority of US domestic payments. Governed by NACHA (National Automated Clearing House Association), ACH processes direct deposits, bill payments, business-to-business transfers, government benefits, tax refunds, and peer-to-peer payments in standardized batch files.

Unlike card networks that process individual transactions in real time, ACH operates as a batch processing system. Originating banks collect transactions throughout the day and submit them as ACH files to one of two ACH operators — the Federal Reserve (FedACH) or The Clearing House (EPN) — which then distribute them to receiving banks for posting to individual accounts.

ACH processes over 30 billion transactions per year, making it the backbone of the American payment system. From your paycheck direct deposit to your mortgage auto-pay, ACH touches nearly every aspect of American financial life.

File Structure

An ACH file follows a strict hierarchical structure with six record types, each identified by a single-digit record type code in position 1.

NACHA ACH File Structure A vertical tree diagram showing the hierarchical nesting of ACH file records: File Header (1) at the top, containing Batch Header (5), which contains Entry Detail (6), optionally followed by Addenda (7), then Batch Control (8), and File Control (9) at the bottom. 1 File Header Record Immediate Destination | Immediate Origin | File Creation Date | ID Modifier 5 Batch Header Record Company Name | SEC Code (PPD/CCD/WEB) | Effective Date | ODFi ID 6 Entry Detail Record Transaction Code | Routing No | Account No | Amount | Individual Name 7 Addenda Record (Optional) Payment-related info, return reason codes, IAT data 8 Batch Control Record Entry Count | Entry Hash | Total Debit $ | Total Credit $ | Company ID 9 File Control Record Batch Count | Block Count | Entry Count | Entry Hash | Total Debit $ | Total Credit $

Each ACH file is exactly 94 characters per line (no delimiters). The record types nest as follows: a File Header (1) wraps one or more Batches, each Batch starts with a Batch Header (5) and ends with a Batch Control (8), and each Batch contains one or more Entry Detail records (6) with optional Addenda records (7). The file ends with a File Control record (9).

SEC Codes

The Standard Entry Class (SEC) code in the Batch Header determines the type of ACH transaction and its authorization requirements:

SEC CodeNameDescriptionCommon Use
PPDPrearranged Payment and DepositConsumer transactions with written authorizationPayroll direct deposit, recurring bill pay
CCDCorporate Credit or DebitBusiness-to-business transactionsVendor payments, cash concentration
WEBInternet-Initiated EntryTransactions authorized via the internetOnline bill pay, e-commerce
TELTelephone-Initiated EntryTransactions authorized by phonePhone orders, collections calls
RCKRe-presented Check EntryElectronic re-presentment of returned checksBounced check recovery

ACH vs Wire vs Check

Understanding when to use ACH versus alternatives is important for cost and timing decisions:

FeatureACHFedwirePaper Check
SpeedSame-day or next-dayReal-time (minutes)2-5 business days
Cost$0.20 - $1.50$15 - $30$1 - $5 (printing/mailing)
Maximum amount$1M (same-day), unlimited (standard)UnlimitedUnlimited
RevocabilityRevocable within limitsIrrevocableStoppable before clearing
Best forRecurring, high volume, lower valueUrgent, high value, time-criticalWhen electronic is not an option

Common Use Cases

  • Payroll direct deposit: PPD credits are the standard for salary payments in the US — used by 93% of workers
  • Bill payments: Utilities, insurance, and subscription services use PPD debits for recurring auto-pay
  • Business-to-business payments: CCD entries handle vendor payments, intercompany transfers, and cash concentration
  • Government disbursements: Social Security, tax refunds, and stimulus payments use ACH for mass distribution
  • E-commerce refunds: WEB credits return funds to customers’ bank accounts after online purchase returns
  • Account-to-account transfers: Apps like Venmo and Zelle use ACH for the underlying fund movement between banks

Try These Examples

Valid PPD Entry (Direct Deposit) Valid

A complete ACH file with File Header (record type 1), Batch Header (type 5, SEC code PPD for payroll direct deposit), Entry Detail (type 6, transaction code 22 for checking credit, routing number 091000019, account 1122334455, amount $500.00), Batch Control (type 8 with hash total), and File Control (type 9). Company ACME CORP is depositing payroll to John Doe.

101 09100001901234567802403151200A094101ORIGINATOR BANK RECEIVER BANK 5200ACME CORP 0123456780PPDPAYROLL 240315240315 1091000010000001 62209100001911223344556 0000050000123456789 JOHN DOE 0091000010000001 820000000100091000010000000000000000000500000123456780 091000010000001 9000001000001000000010009100001000000000000000000050000
Invalid Entry (Wrong Routing Number Check Digit) Invalid

The routing number 091000018 has an invalid check digit. The 9th digit of an ABA routing number is a weighted checksum: (3*0+7*9+1*1+3*0+7*0+1*0+3*0+7*1) mod 10 should equal 9, not 8. ACH operators reject entries with invalid routing numbers.

6222091000018112233445560000050000123456789 JOHN DOE 0091000010000001