What a NACHA file is
A NACHA file is a text file of ACH payment instructions. People also call it an ACH file. A company creates one, usually with payroll or accounting software, and sends it to its bank. The bank then makes the payments.
Three facts explain most of the format:
- Every line is exactly 94 characters. A line is called a record.
- Each piece of data sits at a fixed position in the line. There are no commas or tabs. Text is padded with spaces on the right. Numbers are padded with zeros on the left.
- The file is built in layers. A file holds one or more batches. A batch holds one or more payments. Each layer opens with a header line and closes with a total line.
Your bank may add its own requirements on top of the standard format. Always test a new file with your bank.
A sample ACH file
This is a complete file. The NACHA file validator on this site finds no errors in it. It holds three payroll deposits, and the names, numbers and company are made up.
101 12345678019876543212610300915A094101EXAMPLE BANK SAMPLE COMPANY LLC
5220SAMPLE COMPANY 1987654321PPDPAYROLL 261102 1123456780000001
622123456780000123456789 0000125000EMP001 JORDAN WHITFIELD 0123456780000001
6321100000005550001234 0000098050EMP002 AVERY STONE 0123456780000002
62212345678044556677 0000143218EMP003 MORGAN LEE 1123456780000003
705OCTOBER EXPENSES INCLUDED 00010000003
822000000400356913560000000000000000003662681987654321 123456780000001
9000001000001000000040035691356000000000000000000366268
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
Made-up test data. Do not send it to a bank.
The six kinds of line
| First character | Record | What it does |
|---|---|---|
| 1 | File header | Says which bank the file is for, who sent it, and when it was made. One per file |
| 5 | Batch header | Describes a group of payments: the company, the payment type, the purpose and the date |
| 6 | Entry detail | One payment: the bank, the account, the amount and the name |
| 7 | Addenda | Extra information about the payment above it |
| 8 | Batch control | Totals for the batch |
| 9 | File control | Totals for the whole file. One per file |
Lines made only of 9s at the end are padding. They are explained below.
The file header (line starting with 1)
| Positions | Field | In the sample |
|---|---|---|
| 1 | Record type | 1 |
| 2 to 3 | Priority code | 01 |
| 4 to 13 | Immediate destination: a space, then your bank’s routing number | 123456780 |
| 14 to 23 | Immediate origin: the ID your bank gave you | 1987654321 |
| 24 to 29 | File creation date, as YYMMDD | 261030 |
| 30 to 33 | File creation time, as HHMM | 0915 |
| 34 | File ID modifier: A for the first file of the day | A |
| 35 to 37 | Record size, always 094 | 094 |
| 38 to 39 | Blocking factor, always 10 | 10 |
| 40 | Format code, always 1 | 1 |
| 41 to 63 | Destination name | EXAMPLE BANK |
| 64 to 86 | Origin name | SAMPLE COMPANY LLC |
| 87 to 94 | Reference code | blank |
The batch header (line starting with 5)
| Positions | Field | In the sample |
|---|---|---|
| 2 to 4 | Service class code: 200 mixed, 220 credits only, 225 debits only | 220 |
| 5 to 20 | Company name | SAMPLE COMPANY |
| 21 to 40 | Company discretionary data | blank |
| 41 to 50 | Company ID | 1987654321 |
| 51 to 53 | SEC code: the payment type | PPD |
| 54 to 63 | Company entry description: the purpose, shown to the receiver | PAYROLL |
| 64 to 69 | Company descriptive date | blank |
| 70 to 75 | Effective entry date, as YYMMDD | 261102 |
| 76 to 78 | Settlement date, filled in by the ACH Operator | blank |
| 79 | Originator status code | 1 |
| 80 to 87 | First 8 digits of your bank’s routing number | 12345678 |
| 88 to 94 | Batch number | 0000001 |
Since March 20, 2026, Nacha rules require the description PAYROLL on direct deposits of wages.
A payment (line starting with 6)
| Positions | Field | In the first payment |
|---|---|---|
| 2 to 3 | Transaction code | 22 (checking credit) |
| 4 to 11 | Receiving bank’s routing number, first 8 digits | 12345678 |
| 12 | Check digit of the routing number | 0 |
| 13 to 29 | Account number | 000123456789 |
| 30 to 39 | Amount in cents | 0000125000 ($1,250.00) |
| 40 to 54 | ID number | EMP001 |
| 55 to 76 | Name | JORDAN WHITFIELD |
| 77 to 78 | Discretionary data | blank |
| 79 | Addenda indicator: 1 if an addenda line follows | 0 |
| 80 to 94 | Trace number | 123456780000001 |
The transaction code says what kind of account it is and which way the money moves.
| Code | Meaning | Code | Meaning |
|---|---|---|---|
| 22 | Checking credit | 32 | Savings credit |
| 27 | Checking debit | 37 | Savings debit |
| 23 | Checking credit prenote | 33 | Savings credit prenote |
| 28 | Checking debit prenote | 38 | Savings debit prenote |
These are the eight codes you will meet most. Returns, Notifications of Change, zero-dollar entries, general ledger accounts and loan accounts have their own codes. See the full list of ACH transaction codes.
An addenda record (line starting with 7)
| Positions | Field | In the sample |
|---|---|---|
| 2 to 3 | Addenda type code: 05 for payment information | 05 |
| 4 to 83 | Payment related information, up to 80 characters | OCTOBER EXPENSES INCLUDED |
| 84 to 87 | Addenda sequence number | 0001 |
| 88 to 94 | Last 7 digits of the payment’s trace number | 0000003 |
PPD, CCD and WEB payments can have one addenda record. Type 98 is used for a Notification of Change and type 99 for a return. Both are shown further down: see what a return file looks like and what a Notification of Change file looks like.
The totals (lines starting with 8 and 9)
The batch control line repeats the service class code, then gives:
| Positions | Field | In the sample |
|---|---|---|
| 5 to 10 | Number of payment and addenda lines in the batch | 000004 |
| 11 to 20 | Entry hash | 0035691356 |
| 21 to 32 | Total debits, in cents | 000000000000 |
| 33 to 44 | Total credits, in cents | 000000366268 ($3,662.68) |
| 45 to 54 | Company ID | 1987654321 |
| 80 to 87 | First 8 digits of your bank’s routing number | 12345678 |
| 88 to 94 | Batch number | 0000001 |
The file control line gives the number of batches (2 to 7), the number of blocks (8 to 13), the number of payment and addenda lines (14 to 21), the entry hash (22 to 31), total debits (32 to 43) and total credits (44 to 55).
In the sample, the entry hash is 12345678 + 11000000 + 12345678 = 35691356.
Padding: why the file ends in lines of 9s
ACH files are counted in blocks of 10 lines. If the number of lines is not a multiple of 10, lines of 94 nines are added until it is. The sample has 8 real lines, so 2 padding lines are added. The block count in the file control line is then 1.
CCD, CCD+ and CTX: which format carries remittance detail
Remittance detail tells the receiver what a payment is for, such as the invoice numbers it pays. In an ACH file it travels in addenda records. The business payment types differ in how much they can carry.
| Payment type | Addenda records for each payment | What they hold |
|---|---|---|
| CCD with no addenda record | None | Nothing extra. The payment line stands alone |
| CCD with one addenda record, often called CCD+ | One | Up to 80 characters of payment information |
| CTX | Up to 9,999 | A full ANSI ASC X12 message, or payment information in UN/EDIFACT format |
CCD+ is not a separate SEC code. It is an everyday name for a CCD payment with one addenda record. The batch header says CCD in both cases, and a CCD payment carries at most one addenda record.
CTX is for payments that need more. A CTX payment can carry up to 9,999 addenda records. Together they hold remittance data in a standard business format, ANSI ASC X12 or UN/EDIFACT, so one payment can cover many invoices.
The CTX payment line differs a little from the one shown above:
| Positions | In a CCD payment | In a CTX payment |
|---|---|---|
| 55 to 58 | Start of the name | Number of addenda records that follow |
| 59 to 74 | Rest of the name | Receiving company name |
| 75 to 76 | End of the name | Blank |
Each addenda line of a CTX payment has the layout of the addenda record above. The sequence number counts 0001, 0002 and so on.
Two more things to know:
- Tax payments. Many tax agencies ask for an addenda record in a layout known as TXP. Nacha says TXP is not an SEC code. It is a convention, and each tax agency sets its own details.
- Zero-dollar entries. A CCD or CTX entry can be for zero dollars and carry only remittance data. It has its own transaction codes, such as 24.
Before you send CCD+ or CTX, ask your bank which of them it accepts from you, and ask the company you pay which one it can read. The payment types themselves are explained in ACH SEC codes.
What a return file looks like
When a payment you sent cannot be completed, the receiving bank sends it back as a return. If your bank passes returns to you as a NACHA file, the file has the same kinds of line as any ACH file.
This made-up example returns one payment: a $450.00 debit that Sample Company sent with trace number 123456780000007.
101 123456780 1100000002611040600A094101EXAMPLE BANK SECOND SAMPLE BANK
5225SAMPLE COMPANY 1987654321PPDRENT 261103 1110000000000001
6261234567800099887766 0000045000INV1042 CASEY BROOKS 1110000000000001
799R01123456780000007 11000000 110000000000001
822500000200123456780000000450000000000000001987654321 110000000000001
9000001000001000000020012345678000000045000000000000000
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
Made-up test data. Do not send it to a bank.
| Line | Record | In the example |
|---|---|---|
| 1 | File header | The file goes to Example Bank, the bank that sent the payment. It comes from the bank that returned it |
| 2 | Batch header | The company, the SEC code and the purpose of the payment that came back: Sample Company, PPD, RENT |
| 3 | Entry detail | The returned payment. Transaction code 26 means a return of a checking debit. The amount is 0000045000 ($450.00) |
| 4 | Addenda, type 99 | The return code and the trace number of the original payment |
| 5 | Batch control | Totals for the batch |
| 6 | File control | Totals for the file |
The last four lines are padding.
The return addenda record (line starting with 799)
| Positions | Field | In the example |
|---|---|---|
| 1 | Record type | 7 |
| 2 to 3 | Addenda type code | 99 |
| 4 to 6 | Return reason code | R01 |
| 7 to 21 | Original entry trace number | 123456780000007 |
| 22 to 27 | Date of death | blank |
| 28 to 35 | Original receiving DFI identification | 11000000 |
| 36 to 79 | Addenda information | blank |
| 80 to 94 | Trace number | 110000000000001 |
These positions are the ones Huntington Bank publishes for its return files. DFI means depository financial institution: a bank or credit union. Its identification is the first 8 digits of its routing number.
A return is a new entry with its own trace number. To find the payment it belongs to, match the original entry trace number in positions 7 to 21 with the trace number of the payment you sent.
In the example, the return’s own trace number is 110000000000001. It starts with the first 8 digits of the returning bank’s routing number, not your bank’s.
The return reason code says why the payment came back and what you may do next. Here it is R01. Every code is in the list of ACH return codes.
What a Notification of Change file looks like
A Notification of Change (NOC) is the receiving bank’s way of telling you that a detail in a payment, such as the account number, must be corrected. It can arrive in a NACHA file too.
This made-up example corrects the second payment in the sample file at the top of this page, the one with trace number 123456780000002.
101 123456780 1100000002611030600A094101EXAMPLE BANK SECOND SAMPLE BANK
5220SAMPLE COMPANY 1987654321CORPAYROLL 261102 1110000000000001
6311234567805550001234 0000000000EMP002 AVERY STONE 1110000000000001
798C01123456780000002 110000005550009876 110000000000001
822000000200123456780000000000000000000000001987654321 110000000000001
9000001000001000000020012345678000000000000000000000000
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
Made-up test data. Do not send it to a bank.
A change file differs from a payment file in three ways:
- The batch uses the SEC code COR. It is in positions 51 to 53 of the batch header.
- The entry is for zero dollars. In the example its transaction code is 31, a return or Notification of Change for a savings credit.
- The addenda type is 98. The change code is in positions 4 to 6, and the trace number of the original payment is in positions 7 to 21. The corrected data follows.
In the example the change code is C01, a wrong account number, and the corrected data is the account number to use from now on, 5550009876.
What the corrected data holds depends on the change code. Each code is explained in the list of NOC codes.
Have a return or change file from your bank? Open a return file in the ACH file viewer to read it as a table.
Common mistakes
- A line that is not 94 characters. Editors and email programs strip trailing spaces. Do not edit an ACH file in a word processor.
- Totals that no longer match. If you change or delete a payment by hand, the counts, hash and totals in the 8 and 9 lines are wrong.
- A past effective date. The file is settled at the next opportunity, which can mean Same Day ACH and its fee.
- Wrong service class code. 220 with a debit in the batch, or 225 with a credit, is rejected.
The NACHA file validator checks all of these and tells you which line and field to fix. To make a file from a list of payments, use the NACHA file generator.