NACHA file format

What an ACH file is, how to read one, and what each line means, with a sample file.

By the ACH Forms team. Checked against 8 sources. Last reviewed .

Short answer

A NACHA file, or ACH file, is a plain text file that tells a bank which ACH payments to make. Every line is exactly 94 characters. The first character of each line says what the line is: 1 file header, 5 batch header, 6 payment, 7 addenda, 8 batch total, 9 file total. If you have a .ach file, open it in the ACH file viewer to read it as a table.

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 characterRecordWhat it does
1File headerSays which bank the file is for, who sent it, and when it was made. One per file
5Batch headerDescribes a group of payments: the company, the payment type, the purpose and the date
6Entry detailOne payment: the bank, the account, the amount and the name
7AddendaExtra information about the payment above it
8Batch controlTotals for the batch
9File controlTotals 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)

PositionsFieldIn the sample
1Record type1
2 to 3Priority code01
4 to 13Immediate destination: a space, then your bank’s routing number123456780
14 to 23Immediate origin: the ID your bank gave you1987654321
24 to 29File creation date, as YYMMDD261030
30 to 33File creation time, as HHMM0915
34File ID modifier: A for the first file of the dayA
35 to 37Record size, always 094094
38 to 39Blocking factor, always 1010
40Format code, always 11
41 to 63Destination nameEXAMPLE BANK
64 to 86Origin nameSAMPLE COMPANY LLC
87 to 94Reference codeblank

The batch header (line starting with 5)

PositionsFieldIn the sample
2 to 4Service class code: 200 mixed, 220 credits only, 225 debits only220
5 to 20Company nameSAMPLE COMPANY
21 to 40Company discretionary datablank
41 to 50Company ID1987654321
51 to 53SEC code: the payment typePPD
54 to 63Company entry description: the purpose, shown to the receiverPAYROLL
64 to 69Company descriptive dateblank
70 to 75Effective entry date, as YYMMDD261102
76 to 78Settlement date, filled in by the ACH Operatorblank
79Originator status code1
80 to 87First 8 digits of your bank’s routing number12345678
88 to 94Batch number0000001

Since March 20, 2026, Nacha rules require the description PAYROLL on direct deposits of wages.

A payment (line starting with 6)

PositionsFieldIn the first payment
2 to 3Transaction code22 (checking credit)
4 to 11Receiving bank’s routing number, first 8 digits12345678
12Check digit of the routing number0
13 to 29Account number000123456789
30 to 39Amount in cents0000125000 ($1,250.00)
40 to 54ID numberEMP001
55 to 76NameJORDAN WHITFIELD
77 to 78Discretionary datablank
79Addenda indicator: 1 if an addenda line follows0
80 to 94Trace number123456780000001

The transaction code says what kind of account it is and which way the money moves.

CodeMeaningCodeMeaning
22Checking credit32Savings credit
27Checking debit37Savings debit
23Checking credit prenote33Savings credit prenote
28Checking debit prenote38Savings 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)

PositionsFieldIn the sample
2 to 3Addenda type code: 05 for payment information05
4 to 83Payment related information, up to 80 charactersOCTOBER EXPENSES INCLUDED
84 to 87Addenda sequence number0001
88 to 94Last 7 digits of the payment’s trace number0000003

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:

PositionsFieldIn the sample
5 to 10Number of payment and addenda lines in the batch000004
11 to 20Entry hash0035691356
21 to 32Total debits, in cents000000000000
33 to 44Total credits, in cents000000366268 ($3,662.68)
45 to 54Company ID1987654321
80 to 87First 8 digits of your bank’s routing number12345678
88 to 94Batch number0000001

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 typeAddenda records for each paymentWhat they hold
CCD with no addenda recordNoneNothing extra. The payment line stands alone
CCD with one addenda record, often called CCD+OneUp to 80 characters of payment information
CTXUp to 9,999A 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:

PositionsIn a CCD paymentIn a CTX payment
55 to 58Start of the nameNumber of addenda records that follow
59 to 74Rest of the nameReceiving company name
75 to 76End of the nameBlank

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.

LineRecordIn the example
1File headerThe file goes to Example Bank, the bank that sent the payment. It comes from the bank that returned it
2Batch headerThe company, the SEC code and the purpose of the payment that came back: Sample Company, PPD, RENT
3Entry detailThe returned payment. Transaction code 26 means a return of a checking debit. The amount is 0000045000 ($450.00)
4Addenda, type 99The return code and the trace number of the original payment
5Batch controlTotals for the batch
6File controlTotals for the file

The last four lines are padding.

The return addenda record (line starting with 799)

PositionsFieldIn the example
1Record type7
2 to 3Addenda type code99
4 to 6Return reason codeR01
7 to 21Original entry trace number123456780000007
22 to 27Date of deathblank
28 to 35Original receiving DFI identification11000000
36 to 79Addenda informationblank
80 to 94Trace number110000000000001

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.

Questions and answers

What do I do with a .ach file?

It depends where it came from. If your payroll or accounting software made it, you upload it to your bank's business banking site so the bank can make the payments. If your bank sent it to you, it is a report of returns or changes. Either way, you can read it with the ACH file viewer and check it with the NACHA file validator.

What is a NACHA file in banking?

It is a batch of payment instructions in the format set by Nacha, the organization that runs the ACH network rules. A company sends the file to its bank. The bank combines it with other companies' files and passes it to the ACH network.

How do I read a NACHA file?

Look at the first character of each line. A line starting with 6 is one payment. Characters 4 to 12 are the receiving bank's routing number, 13 to 29 the account number, 30 to 39 the amount in cents, and 55 to 76 the name. The viewer on this site does this for you.

What is an ACH addenda record?

An addenda record is an extra line, starting with 7, that carries more information about the payment before it. For ordinary payments it holds up to 80 characters of free text, such as an invoice number. In return files it carries the return code, and in Notifications of Change it carries the corrected details.

What is the entry hash in an ACH file?

The entry hash is a check total. Add up the first 8 digits of the routing number on every payment line. If the sum has more than 10 digits, keep the last 10. The batch total line holds the sum for the batch, and the file total line holds the sum of the batch hashes.

What is the CTX format in ACH?

CTX, Corporate Trade Exchange, is a payment type for business-to-business payments that need a lot of remittance detail. A CTX payment can carry up to 9,999 addenda records. A CCD payment, the usual business type, carries at most one.

What is the CCD+ format?

CCD+ is an everyday name for a CCD payment that has one addenda record. The addenda record holds up to 80 characters of payment information, such as an invoice number. It is not a separate payment type. The SEC code in the file is still CCD.

What does an ACH return file look like?

It is a NACHA file like any other. Each returned payment is an entry line followed by an addenda line of type 99. The addenda line holds the return code in positions 4 to 6 and the trace number of the original payment in positions 7 to 21. See the example return file.

What does a Notification of Change (NOC) file look like?

The batch uses the SEC code COR. Each entry is for zero dollars and is followed by an addenda line of type 98. That line holds the change code, the trace number of the original payment and the corrected data. See the example change file.

Sources

  1. ACH file overview, Nacha
  2. ACH file details (record layouts), Nacha
  3. NACHA File Specifications, First Citizens Bank
  4. NACHA File Layout Guide, Regions Bank
  5. Company Entry Descriptions (PAYROLL and PURCHASE), Nacha
  6. NACHA Returns (layout of a return file and its addenda record), Huntington Bank
  7. ACH Return, NOC and Transaction Codes, Commerce Bank
  8. Green Book, chapter 6, Notification of Change (SEC code COR), US Treasury, Bureau of the Fiscal Service

Last reviewed . How we check our information. Report a mistake on this page.

General information, not legal or financial advice. Rules change and banks set their own requirements. Check with your bank before you act. ACH Forms is not affiliated with Nacha.