Skip to content
Social Matter
Solutions
Book a call

Developer reference

Nacha file format, every 94 characters.

How an ACH file is built, record by record, with a fictional sample.

Updated ยท 10 primary sources

The short answer
  • 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.

TypeRecordHolds
1File headerDestination and origin, file creation date and time
5Batch headerCompany name and ID, SEC code, description, effective date
6Entry detailTransaction code, receiver's routing and account, amount, trace
7AddendaPayment-related information for the entry above it
8Batch controlEntry and addenda count, entry hash, debit and credit totals
9File controlBatch, block and entry counts, hash, file totals
9 (padding)FillerLines 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.

sample.achSample data
  1. 101 999999999 9999999992609130900A094101SAMPLE ODFI SAMPLE CO
  2. 5220SAMPLE CO SAMPLE0001CCDINVOICES 260915 1999999990000001
  3. 622999999999XXXXXX6789 0000125000INV-0001 SAMPLE VENDOR A 1999999990000001
  4. 705SAMPLE DATA. NOT A REAL TRANSACTION. INVOICE INV-0001 00010000001
  5. 622999999999XXXXXX4321 0000098050INV-0002 SAMPLE VENDOR B 0999999990000002
  6. 82200000030199999998000000000000000000223050SAMPLE0001 999999990000001
  7. 9000001000001000000030199999998000000000000000000223050
  8. 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
  9. 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
  10. 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999

Batch header

Batch header (5) field positions

PositionsFieldNotes
01Record type codeAlways 5
02-04Service class code200 mixed, 220 credits only, 225 debits only
05-20Company nameThe name the receiver recognizes
21-40Company discretionary dataOptional
41-50Company identificationAssigned by the ODFI
51-53Standard Entry Class codeCCD, PPD, WEB, TEL and others
54-63Company entry descriptionSome SEC codes and rules require set values
64-69Company descriptive dateOptional; SD1800 may flag the third window
70-75Effective entry dateYYMMDD, the intended settlement day
76-78Settlement date (Julian)Inserted by the ACH Operator
79Originator status codeRefers to the ODFI
80-87Originating DFI identificationThe ODFI's routing number, 8 digits
88-94Batch numberAscending; matches the batch control record

Entry detail

Entry detail (6) field positions

PositionsFieldNotes
01Record type codeAlways 6
02-03Transaction codeDebit or credit, checking or savings
04-11Receiving DFI identificationFirst 8 digits of the routing number
12Check digitNinth digit of the routing number
13-29DFI account numberThe receiver's account number
30-39AmountFormat $$$$$$$$cc
40-54Identification numberOptional reference, such as an invoice number
55-76Receiver nameHelps identify returns
77-78Discretionary data or payment type codeODFI use; payment type for WEB and TEL
79Addenda record indicator0 none, 1 addenda follows
80-94Trace numberODFI routing digits, then a unique ascending number

Codes and totals

Transaction codes and control totals

ItemValueMeaning
Transaction code22 / 32Credit to checking / savings
Transaction code27 / 37Debit to checking / savings
Transaction code23 / 28Checking prenote, credit / debit
Transaction code33 / 38Savings prenote, credit / debit
Addenda type code05Payment information on CCD, PPD and WEB
Addenda type code98 / 99Notification of change / return
Entry hashSum of receiving DFI IDsBatch control; file control sums batch hashes
Block countNumber of 10-line blocksFile control
Entry/addenda countEntries plus addenda recordsBatch control and file control
Record size, blocking factor094, 10Fixed 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.

After the cart

Need this built or fixed?

Thirty minutes with the people who build it.