Developer reference
Nacha file format, every 94 characters.
How an ACH file is built, record by record, with a fictional sample.
- A Nacha file is fixed-width ASCII text, every line exactly 94 characters.
- Records run 1, 5, 6, 7, 8, 9: file, batch, entry, addenda, controls.
- Control records carry counts, dollar totals and a hash of receiving routing numbers.
The ground rules
What makes a valid Nacha file
- 94 characters per line
- A fixed-width ASCII file; every record is exactly 94 characters.
- Records in order
- Headers open each file and batch; matching control records close them.
- Blocks of ten
- The line count must be a multiple of ten, padded with lines of 9s.
- Letters left, numbers right
- Alphanumeric fields left-justified with spaces; numeric fields right-justified with zeros.
- Uppercase codes
- Fields that hold codes take uppercase characters only.
- Ascending trace numbers
- Trace numbers ascend within a batch, though not necessarily consecutively.
- Your bank's spec
- Your ODFI may add its own formatting requirements, often in the file header.
- Not ISO 20022
- ACH files stay fixed-width; Nacha maps returns to ISO 20022 bank statements.
Six record types
The six record types
The first character of every line tells you the record type.
| Type | Record | Holds |
|---|---|---|
| 1 | File header | Destination and origin, file creation date and time |
| 5 | Batch header | Company name and ID, SEC code, description, effective date |
| 6 | Entry detail | Transaction code, receiver's routing and account, amount, trace |
| 7 | Addenda | Payment-related information for the entry above it |
| 8 | Batch control | Entry and addenda count, entry hash, debit and credit totals |
| 9 | File control | Batch, block and entry counts, hash, file totals |
| 9 (padding) | Filler | Lines of 9s up to a multiple of ten |
Sample data
A sample CCD file, line by line
Sample data. Not a real transaction. Routing numbers are all 9s; accounts masked.
- 101 999999999 9999999992609130900A094101SAMPLE ODFI SAMPLE CO
- 5220SAMPLE CO SAMPLE0001CCDINVOICES 260915 1999999990000001
- 622999999999XXXXXX6789 0000125000INV-0001 SAMPLE VENDOR A 1999999990000001
- 705SAMPLE DATA. NOT A REAL TRANSACTION. INVOICE INV-0001 00010000001
- 622999999999XXXXXX4321 0000098050INV-0002 SAMPLE VENDOR B 0999999990000002
- 82200000030199999998000000000000000000223050SAMPLE0001 999999990000001
- 9000001000001000000030199999998000000000000000000223050
- 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
- 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
- 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
Batch header
Batch header (5) field positions
| Positions | Field | Notes |
|---|---|---|
| 01 | Record type code | Always 5 |
| 02-04 | Service class code | 200 mixed, 220 credits only, 225 debits only |
| 05-20 | Company name | The name the receiver recognizes |
| 21-40 | Company discretionary data | Optional |
| 41-50 | Company identification | Assigned by the ODFI |
| 51-53 | Standard Entry Class code | CCD, PPD, WEB, TEL and others |
| 54-63 | Company entry description | Some SEC codes and rules require set values |
| 64-69 | Company descriptive date | Optional; SD1800 may flag the third window |
| 70-75 | Effective entry date | YYMMDD, the intended settlement day |
| 76-78 | Settlement date (Julian) | Inserted by the ACH Operator |
| 79 | Originator status code | Refers to the ODFI |
| 80-87 | Originating DFI identification | The ODFI's routing number, 8 digits |
| 88-94 | Batch number | Ascending; matches the batch control record |
Entry detail
Entry detail (6) field positions
| Positions | Field | Notes |
|---|---|---|
| 01 | Record type code | Always 6 |
| 02-03 | Transaction code | Debit or credit, checking or savings |
| 04-11 | Receiving DFI identification | First 8 digits of the routing number |
| 12 | Check digit | Ninth digit of the routing number |
| 13-29 | DFI account number | The receiver's account number |
| 30-39 | Amount | Format $$$$$$$$cc |
| 40-54 | Identification number | Optional reference, such as an invoice number |
| 55-76 | Receiver name | Helps identify returns |
| 77-78 | Discretionary data or payment type code | ODFI use; payment type for WEB and TEL |
| 79 | Addenda record indicator | 0 none, 1 addenda follows |
| 80-94 | Trace number | ODFI routing digits, then a unique ascending number |
Codes and totals
Transaction codes and control totals
| Item | Value | Meaning |
|---|---|---|
| Transaction code | 22 / 32 | Credit to checking / savings |
| Transaction code | 27 / 37 | Debit to checking / savings |
| Transaction code | 23 / 28 | Checking prenote, credit / debit |
| Transaction code | 33 / 38 | Savings prenote, credit / debit |
| Addenda type code | 05 | Payment information on CCD, PPD and WEB |
| Addenda type code | 98 / 99 | Notification of change / return |
| Entry hash | Sum of receiving DFI IDs | Batch control; file control sums batch hashes |
| Block count | Number of 10-line blocks | File control |
| Entry/addenda count | Entries plus addenda records | Batch control and file control |
| Record size, blocking factor | 094, 10 | Fixed values in the file header |
Descriptions and dates
Required descriptions and effective dates
- PAYROLL
- Required for PPD credits paying wages, since March 20, 2026.
- PURCHASE
- Required for consumer debits buying goods online, since March 20, 2026.
- RETRY PYMT
- Required on every permitted reinitiation of a returned entry.
- REVERSAL
- Required on reversing entries, with SEC code, Company ID and amount unchanged.
- ACCTVERIFY
- Required on micro-entries used to verify an account.
- Stale dates
- Today's or earlier dates process as Same Day ACH if sent by the deadline.
- Never before authorization
- Debiting a receiver before the authorization date violates the Nacha Rules.
Questions
What people ask about Nacha files.
- What is a Nacha file?
- A fixed-width text file of ACH entries that an originator sends to its bank.
- How many characters are in a Nacha file record?
- 94. Every record, including padding lines, is exactly 94 characters long.
- What is the ACH file format?
- Nacha's format: a file header, batches of entries and addenda, then control records.
- What is the entry hash in an ACH file?
- The sum of the 8-digit receiving DFI identification numbers in the batch.
- What does 101 mean at the start of an ACH file?
- Record type 1, the file header, followed by priority code 01.
- Why does an ACH file end with lines of 9s?
- Padding, so the line count reaches a multiple of ten.
Sources
Where every fact comes from.
Primary sources only. Rules change, so check the date above.
- Nacha ACH Guide for Developers: ACH File Overview
- Nacha ACH Guide for Developers: ACH File Details (record layouts)
- Nacha: RMAG Originator Essentials (2024)
- Nacha: Expanding Same Day ACH (SD1800 indicator)
- Nacha: Company Entry Descriptions (PAYROLL, PURCHASE)
- Nacha: ACH Network Risk and Enforcement Topics (RETRY PYMT)
- Nacha: Reversals and Enforcement (REVERSAL formatting)
- Nacha: Micro-Entries (ACCTVERIFY)
- Nacha: ISO 20022 camt.053 guide, return and NOC record layouts (2023)
- Nacha: ISO 20022 resources
After the cart
Need this built or fixed?
Thirty minutes with the people who build it.