NACHA file format

A NACHA file, or ACH file, is plain text with one record per line. Every record is 94 characters long, and its first character says which record it is.

An example file, line by line

This is our sample nacha-sample-valid.ach: a payroll batch and a vendor batch. The routing numbers are invented; they start with 99.

101·990000026·9900000132610090830A094101SAMPLE·DESTINATION·BANKSAMPLE·COMPANY·················
5220SAMPLE·COMPANY··NOT·A·REAL·PAYMENT··1990000001PPDPAYROLL···OCT·09261013···1990000010000001
622990000110000111222333·····0000185000EMP0001········SAMPLE·EMPLOYEE·ONE·····0990000010000001
62299000012344455566·········0000212550EMP0002········SAMPLE·EMPLOYEE·TWO·····0990000010000002
6329900001367778889990·······0000097025EMP0003········SAMPLE·EMPLOYEE·THREE···0990000010000003
822000000302970000360000000000000000004945751990000001·························990000010000001
5200SAMPLE·COMPANY··NOT·A·REAL·PAYMENT··1990000001CCDVENDOR·PAYOCT·09261013···1990000010000002
6229900002175550001··········0001250000VENDOR-17······SAMPLE·SUPPLIER·LLC·····1990000010000004
705RMR*IV*INV-2041**12500.00\······················································00010000004
6279900002205550002··········0000048000CUST-88········SAMPLE·CUSTOMER·INC·····0990000010000005
820000000301980000430000000480000000012500001990000001·························990000010000002
9000002000002000000060495000079000000048000000001744575·······································
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999

Spaces are shown as dots so that they can be counted; the download holds the file as it is.

LineTypeRecord
11File Header
25Batch Header
36Entry Detail
46Entry Detail
56Entry Detail
68Batch Control
75Batch Header
86Entry Detail
97Addenda
106Entry Detail
118Batch Control
129File Control
13-209Padding: a line of 9s

The order of the records

  1. One File Header (1).
  2. For each batch: a Batch Header (5), its Entry Detail records (6), each followed by its Addenda records (7) if it has any, and a Batch Control (8).
  3. One File Control (9).
  4. Lines of 9s until the number of lines is a multiple of 10. The File Header says so: blocking factor 10.

Field positions

Positions count from 1. Numbers are right-justified and zero-filled; text is left-justified and space-filled.

Type 1: File Header
PositionsFieldContent
1Record type1
2-3Priority code01
4-13Immediate destinationA blank, then your bank's 9-digit routing number
14-23Immediate originA blank, then a 9-digit routing number, or what your bank tells you to put here
24-29File creation dateYYMMDD
30-33File creation timeHHMM, or blank
34File ID modifierA-Z or 0-9
35-37Record size094
38-39Blocking factor10
40Format code1
41-63Immediate destination nameYour bank's name
64-86Immediate origin nameYour company's name
87-94Reference codeOptional
Type 5: Batch Header
PositionsFieldContent
1Record type5
2-4Service class code200 mixed, 220 credits only, 225 debits only
5-20Company nameAs the receiver will see it
21-40Company discretionary dataOptional
41-50Company identificationThe ID your bank assigned your company
51-53Standard entry class codePPD, CCD, WEB, TEL, CTX, ...
54-63Company entry descriptionFor example PAYROLL
64-69Company descriptive dateOptional, as text
70-75Effective entry dateYYMMDD, the day you want the entries to settle
76-78Settlement dateBlank; filled in by the ACH operator
79Originator status code1 (0 and 2 exist)
80-87Originating DFI identificationFirst 8 digits of your bank's routing number
88-94Batch numberAscending within the file
Type 6: Entry Detail
PositionsFieldContent
1Record type6
2-3Transaction code22 checking credit, 27 checking debit, 32 savings credit, 37 savings debit
4-11Receiving DFI identificationFirst 8 digits of the receiver's routing number
12Check digitNinth digit of that routing number
13-29DFI account numberLeft-justified, space-filled
30-39AmountIn cents, zero-filled, no decimal point
40-54Identification numberYour reference for the receiver
55-76Individual nameReceiver's name
77-78Discretionary dataOptional; for WEB and TEL the payment type code
79Addenda record indicator1 if an addenda record follows, otherwise 0
80-94Trace numberFirst 8 digits of your bank's routing number and a 7-digit sequence
Type 7: Addenda
PositionsFieldContent
1Record type7
2-3Addenda type code05 for remittance information
4-83Payment related informationFree text, for example an invoice number
84-87Addenda sequence number0001 for the first addenda of an entry
88-94Entry detail sequence numberLast 7 digits of the entry's trace number
Type 8: Batch Control
PositionsFieldContent
1Record type8
2-4Service class codeSame as the batch header
5-10Entry/addenda countEntries plus addenda records in the batch
11-20Entry hashSee below
21-32Total debit amountIn cents
33-44Total credit amountIn cents
45-54Company identificationSame as the batch header
55-73Message authentication codeUsually blank
74-79ReservedBlank
80-87Originating DFI identificationSame as the batch header
88-94Batch numberSame as the batch header
Type 9: File Control
PositionsFieldContent
1Record type9
2-7Batch countNumber of batches
8-13Block countRecords in the file divided by 10, rounded up
14-21Entry/addenda countAll entries and addenda records
22-31Entry hashSum of the batches' entry hashes, last 10 digits
32-43Total debit amountIn cents
44-55Total credit amountIn cents
56-94ReservedBlank

CTX and IAT entries move some of the type 6 fields.

Totals and the entry hash

Each Batch Control repeats what its batch holds: the number of entries and addenda, the debit and credit totals in cents, and the entry hash. The entry hash is the sum of the 8-digit receiving DFI numbers (positions 4-11) of the batch's entries, keeping the last 10 digits.

In the sample's first batch: 99000011 + 99000012 + 99000013 = 297000036. The Batch Control on line 6 has 0297000036 in positions 11-20.

The File Control adds up the batches, and its block count is the number of lines divided by 10. When one of these does not match, see the entry hash does not match and the block count does not match.

Check a file

The NACHA file validator checks the record lengths, order, counts, entry hash and totals of your own file and names the line and positions of each problem. To see the entries as a table, use NACHA file to Excel. Both only read the file.

Check a NACHA file

Layouts from Nacha's ACH developer guide. Your bank may have rules of its own.