NACHA File Format

Overview

What is a NACHA file?

The NACHA File Format is a standard format specified by National Automated Clearing House Association (NACHA) to facilitate capturing debit or credit transactions against bank accounts.

Who uses the NACHA file format?

Financial institutions that need to perform monetary transactions, such as paying bills, crediting or depositing money, typically use the NACHA standard. Those transactions are typically performed against bank accounts for individuals or organizations.

The NACHA standard captures these transactions in a consistent and standard manner.

Billions of transactions are performed using the NACHA standard every year.

Why use the NACHA file format?

The NACHA format allows for the standardization of transactions across banks and financial institutions. This standardization allows for the seamless processing of transactions and better security of sensitive information. 

Automated Clearing House (ACH) has become the go-to network for B2B transactions and moves billions of transactions a year.


The NACHA File Format

A NACHA file prompts ACH payments to be made based on the content in the various records. The format of a NACHA file includes a text file using 94 characters per line. The file supports ASCII characters. 

Each line in a NACHA file is called a record. The structure of the file includes five different record types. Those record types are:

  • File Header
  • Batch Header 
  • Detail
  • Addenda (optional)
  • Batch Control
  • File Control

A record type is identified by the starting character for each line. 

Record Type

Starting Character

File Header Record

1

Batch Header Record

5

Detail Record

6

Addenda Record

7

Batch Control Record

8

File Control Record

9

The file layout is as follows:

  • File Header Record
    • Batch Header Record
      • Detail Records
        • Addenda (Optional)
    • Batch Control Record
  • File Control Record

ACH payment file relationship of records

 

Important Information about NACHA format

  • A single NACHA file can contain multiple batches.
  • Each batch can contain multiple transactions (detail records).
  • Each transaction can have an optional Addenda record.
  • Batch Control provides a summary of the batch.
  • The File Control record provides a summary of the file.

Record Types

 

File Header

The File Header presents information such as the payer of the transaction as well as the financial institution administering the transaction.

# Field Type Required Start End Length Fixed Value Format Mask Regex
1 Record Type Code Digits YES 1 1 1 1   ^1$
2 Priority Code Digits YES 2 3 2 01   ^01$
3 Immediate Destination Alphanumeric YES 4 13 9   bNNNNNNNNNN  
4 Immediate Origin Digits YES 14 23 10   1NNNNNNNNNN
NNNNNNNNNN
 
5 File Creation Date Date YES 24 29 6   YYMMDD  
6 File Creation Time Time YES 30 33 4   HHMM  
7 File ID Modifier Alphanumeric YES 34 34 1      
8 Record Size Digits YES 35 37 3 094   ^094$
9 Blocking Factor Digits YES 38 39 2      
10 Format Code Digits YES 40 40 1 1   ^1$
11 Immediate Destination Name Alphanumeric YES 41 63 23      
12 Immediate Origin Name Alphanumeric NO 64 86 23      
13 Reference Code Alphanumeric NO 87 94 8 blank spaces    

Batch Header

As opposed to the File Header, the Batch Header presents more detailed information regarding the payment such as the standard entry class, payment descriptions, effective entry date, and various other prenotes.

# Field Type Required Start End Length Fixed Value Format Mask Regex
1 Record Type Code Digit YES 1 1 1 5   ^5$
2 Service Class Code Digits YES 2 4 3     ^2(?:00|2[05])$
3 Company Name Alphanumeric YES 5 20 16      
4 Company Discretionary Data   NO 21 40 20 Blank    
5 Company ID Digits YES 41 50 10      
6 SEC Code Characters YES 51 53 3      
7 Company Entry Description Alphanumeric YES 54 63 10      
8 Company Descriptive Date Alphanumeric or YYMMDD NO 64 69 6      
9 Effective Entry Date Date YES 70 75 6   YYMMDD  
10 Reserved     76 78 3 Blank    
11 Originator Status Code   YES 79 79 1 1   ^1$
12 Originating DFI ID Numeric YES 80 87 8      
13 Batch Number Numeric YES 88 94 7      

SEC Codes

Here are the SEC codes and their brief description.

ARC

Accounts Receivable Entries

BOC

Back Office Conversion

CCD

Corporate Credit or Debit

COR

CIE

Customer Initiated Entries

CTX

Corporate Trade Exchange

IAT

Internation ACH Transmission

POP

Point of Purchase

POS

Point of Sale

PPD

Pre-arranged Payment or Deposit

RCK

Represented Check Entries

TEL

Telephone Initiated Entries

WEB

Internet/Mobile Initiated Entries

 

Detail Record (Transaction)

The Detail Record (Transaction) includes the data which is needed for a deposit or withdrawal from a bank account. The information included could be a recipient’s name, the specific dollar amount of the transaction, or the account number of either party. 

# Field Type Required Start End Length Fixed Value Format Mask Regex
1 Record Type Code Digits YES 1 1 1 6   ^6$
2 Transaction Code Digits YES 2 3 2     ^01$
3 RDFI ID Digits YES 4 11 8      
4 Check Digit Digit YES 12 12 1     ^[0-9]$
5 DFI Account Number Alphanumeric YES 13 29 17      
6 Amount Digits YES 30 39 10   $$$$$$$$¢¢  
7 Identification Number Alphanumeric NO 40 54 15      
8 Receiving Company Name Alphanumeric YES 55 76 22      
9 Discretionary Data Alphanumeric NO 77 78 2      
10 Addenda Record Indicator Digits YES 79 79 1 0 or 1   ^[0|1]$
11 Trace Number Digits YES 80 94 15      

Addenda

The addenda record contains additional information regarding the payment in the NACHA file. Most commonly used for business to business transactions, the addenda could include information such as supplemental information that could be required to identify the holder of the account or even just an opportunity to convey important information

Batch Control

The Batch Control record simply includes the total amount of all entries in the batch. 

# Field Type Required Start End Length Fixed Value Format Mask Regex
1 Record Type Code Digit YES 1 1 1 8   ^8$
2 Service Class Code Digit YES 2 4 3     ^2(?:00|80|2[05])$
3 Transaction and Addenda Count Digit YES 5 10 6      
4 Entry Hash Digit YES 11 20 10      
5 Total Debit Digit YES 21 32 12      
6 Total Credit Digit YES 33 44 12      
7 Company Identification Digit YES 45 54 10      
8 Message Authentication Code Alphanumeric NO 55 73 19 Leave blank    
9 Reserved Alphanumeric NO 74 79 6 Leave blank    
10 Originating DFI ID Digit YES 80 87 8      
11 Batch Number Digit YES 88 94 7      

Hash Value for Batch Control

The sum of the value(s) in the receiving DFI identification (field 3, positions 4-11) for every entry detail record (6) in the file.

If the sum exceeds 10 characters, the field must be populated with the rightmost 10 characters. To get the rightmost characters, do modulo 10000000000L

File Control

The File Control Record acts as a final review on the data submitted. It contains the count of all records, the count of entries, as well as debit and credit totals.

# Field Type Required Start End Length Fixed Value Format Mask Regex
1 Record Type Code Digit YES 1 1 1 9   ^9$
2 Batch Count Digit YES 2 7 6      
3 Block Count Digit YES 8 13 6      
4 Entry/Addenda Count Digit YES 14 21 8      
5 Entry Hash Digit YES 22 31 10      
6 Total Debit Digit YES 32 43 12      
7 Total Credit Digit YES 32 43 12      
8 Reserved Alphanumeric YES 56 94 39 Blank spaces    

Hash Value for File Control

The entry hash is the sum of the entry hash fields contained within the batch control records of the file. (e.g. sum of all field 4 of eight (8) records in the field).

If the sum exceeds 10 characters, the field must be populated with the rightmost 10 characters. To get the rightmost characters, do modulo 10000000000L