The world of digital payments is fast-paced and highly structured, and for those who work in the banking or financial technology sectors, understanding the intricacies of the NACHA file format is essential. The National Automated Clearing House Association (NACHA) governs the ACH (Automated Clearing House) system in the United States—a network responsible for processing billions of electronic financial transactions each year. Whether you’re setting up direct deposits, auto bill payments, or B2B transfers, learning how to create and interpret NACHA files is crucial.
In this step-by-step tutorial, we’ll explore the structure and standards of a NACHA file, making it accessible even if you’re new to the financial data processing space. Let’s uncover the layers of this standardized format that enables secure, efficient, and uniform electronic transactions across the U.S.
Contents
What is a NACHA File?
A NACHA file is a plain-text file used to transmit batches of ACH transactions to banks. It acts as a universal language that financial institutions use to process various transaction types, including direct deposits, vendor payments, tax payments, and more.
Each NACHA file is composed of records arranged in a strict hierarchical structure, and every record follows a fixed-length format that systems can interpret easily. These records include important information such as account numbers, routing numbers, amounts, and bank identifiers.
Basic NACHA File Structure
A NACHA file contains six key record types:
- File Header Record
- Batch Header Record
- Entry Detail Record
- Addenda Record (Optional)
- Batch Control Record
- File Control Record
This rigid format ensures that even millions of transactions can be processed automatically without confusion or misinterpretation. Let’s break down what each of these record types includes and represents.
1. File Header Record
This is the first line in any NACHA file. It identifies the file, the sender, the receiver, and the creation date. It also includes critical information such as the Immediate Destination and Immediate Origin codes, which typically correspond to the bank routing numbers.
Key fields in the File Header:
- Record Type Code (always 1)
- Priority Code
- Immediate Destination
- Immediate Origin
- File Creation Date & Time
- File ID Modifier

2. Batch Header Record
The Batch Header Record starts a new batch of transactions. Each batch represents a group of similar transactions (e.g., payroll deposits or vendor payments). It’s within these batches that transaction types, like credit or debit entries, are specified.
Essential fields include:
- Service Class Code (defines batch as credits, debits, or both)
- Company Name
- Standard Entry Class (SEC) code
- Company Entry Description
- Effective Entry Date
3. Entry Detail Record
This record is the heart of the ACH transaction—it carries the account information, transaction amount, and routing details. Each Entry Detail Record represents a single payment or deposit.
Important fields found here:
- Transaction Code (e.g., 22 for checking deposit)
- Receiving DFI Identification (routing number)
- DFI Account Number
- Amount
- Individual’s Name or Account Holder
Each batch may contain many Entry Detail Records based on the number of transactions grouped in that batch.
4. Addenda Record (Optional)
This record allows entry of additional informational fields per transaction. It’s primarily used when transmitting invoice numbers, payment explanations, or remittance advice. Only one addenda can follow each Entry Detail Record.
Common fields include:
- Addenda Type Code
- Payment Related Information (e.g., invoice number)
- Entry Detail Sequence Number

5. Batch Control Record
The Batch Control Record summarizes the contents of a single batch. It provides totals that allow the receiving bank to verify the accuracy of the transactions in that batch. It also marks the end of a batch.
Fields include:
- Entry and Addenda Count
- Entry Hash
- Total Debit Amount
- Total Credit Amount
6. File Control Record
This final record marks the end of the NACHA file. It summarizes the entire file’s contents and acts as a final verification checkpoint. The numbers in this record should match the sum of entries across all batches.
Typical fields found:
- Batch Count
- Block Count
- Entry/Addenda Count
- Entry Hash
- Total Debit & Credit Entries in all batches
NACHA Formatting Rules & Conventions
NACHA files must adhere to strict formatting rules to be accepted by financial institutions. Some key rules include:
- Each record must be exactly 94 characters long.
- The file must be a plain-text ASCII file.
- Leading and trailing spaces are used to fill required field lengths.
- Amounts are specified in cents without decimal points (e.g., $105.25 is entered as 0000010525).
- The file must include blocks of 10 records—if not a multiple of 10, additional filler records are added.
Common SEC Codes You Should Know
SEC (Standard Entry Class) codes define the type of transactions contained in a batch. Banks use these codes to determine processing rules and security requirements.
- PPD – Prearranged Payment and Deposits (for consumer transactions)
- CCD – Corporate Credit or Debit (for business-to-business payments)
- CTX – Corporate Trade Exchange (includes addenda for remittance data)
- WEB – Internet-Initiated Entries
- ARC – Accounts Receivable Entries
- BOC – Back Office Conversion Entries
Creating a Basic NACHA File: Step-by-Step
- Start with the File Header Record, using your company/bank identifiers and timestamp.
- Create a Batch Header for the type of transactions you want to submit.
- Add related Entry Detail Records for each payment or debit.
- Optionally add Addenda Records if additional transaction details are needed.
- Insert a Batch Control record to sum up batch values.
- After you finish all batches, close the file with a File Control Record.
You can build NACHA files programmatically using scripting languages like Python, Java, or .NET. Various fintech platforms even offer pre-built NACHA generators or APIs that help you format transactions properly for submission.
Tips for Working with NACHA Files
- Validate regularly: Use validation tools to double-check formatting and record completeness before submission.
- Secure your files: As financial documents, NACHA files should be encrypted and transferred securely.
- Keep up with updates: NACHA regulations evolve. Make sure you’re compliant with the latest guidelines and rules.
Conclusion
Understanding the NACHA file format is a vital skill for anyone involved in managing electronic payments in the United States. Once broken into components, the format becomes logical and straightforward. The keys to mastering NACHA are attention to detail, strict adherence to formatting, and a solid understanding of banking protocols. As ACH transactions become more integrated into digital platforms, having competency in NACHA file creation is an asset that sets you apart.
Whether you’re a developer, financial analyst, or operations professional, knowing how to work with NACHA files makes your organization’s transaction handling faster, more accurate, and fully compliant with national standards.