BatchPay QB logoBatchPay QB

NACHA File Format: Examples & Complete Guide

A field-by-field breakdown of every record type in the NACHA / ACH file format, with a full annotated example you can reference.

|15 min read

1. What Is a NACHA File?

A NACHA file (sometimes called an ACH file) is a standardized flat-text file used to instruct banks to process electronic payments through the Automated Clearing House (ACH) network. NACHA stands for the National Automated Clearing House Association, the organization that defines and maintains the file format specification.

Every line in a NACHA file is exactly 94 characters long. The file uses a fixed-width format — meaning each field occupies a predefined number of character positions, padded with spaces or zeros as needed. Files typically carry the .ach extension and are uploaded to your bank's ACH portal to initiate payments or collections.

Because the format is strict and unforgiving, even a single character out of place will cause a bank to reject the file. That is why understanding the structure — and using reliable tooling — is essential.

2. NACHA File Structure Overview

A NACHA file is organized in a strict hierarchy. Think of it as a container (the file) holding one or more batches, each of which holds one or more payment entries:

File Header Record (Record Type 1) ── 1 per file │ ├── Batch Header Record (Record Type 5) ── 1 per batch │ ├── Entry Detail Record (Record Type 6) ── 1 per payment │ │ └── Addenda Record (Record Type 7) ── 0-1 per entry (optional) │ ├── Entry Detail Record (Record Type 6) │ └── ... ├── Batch Control Record (Record Type 8) ── 1 per batch │ ├── (additional batches ...) │ File Control Record (Record Type 9) ── 1 per file 9-record padding lines (to fill block) ── as needed
  • File Header (1) — Identifies the originating company and destination bank. One per file.
  • Batch Header (5) — Groups related entries (e.g., all payroll payments). A file can contain multiple batches.
  • Entry Detail (6) — A single payment or collection instruction to/from one account.
  • Addenda (7) — Optional additional information attached to an entry (used in certain SEC codes like CTX).
  • Batch Control (8) — Summary totals for the preceding batch: entry count, dollar totals, and entry hash.
  • File Control (9) — Summary totals for the entire file. Followed by padding lines of all 9s to make the total line count a multiple of 10.

3. File Header Record (Record Type 1)

The File Header is always the first line in a NACHA file. It identifies who is sending the file and where it is going.

101 021000021 123456789 2603081200A094101RECEIVING BANK ACME CORPORATION REF00001
PositionLengthField NameExample ValueDescription
11Record Type Code1Always "1" for File Header
2-32Priority Code01Always "01"
4-1310Immediate Destination 021000021Routing number of the receiving bank (space-prefixed)
14-2310Immediate Origin 123456789Routing number or tax ID of the originator (space-prefixed)
24-296File Creation Date260308YYMMDD format
30-334File Creation Time1200HHMM format (optional but recommended)
341File ID ModifierAA-Z, 0-9. Distinguishes files created on the same date
35-373Record Size094Always "094" (94 characters per record)
38-392Blocking Factor10Always "10" (10 records per block)
401Format Code1Always "1"
41-6323Immediate Destination NameRECEIVING BANKName of the destination bank
64-8623Immediate Origin NameACME CORPORATIONName of the originating company
87-948Reference CodeREF00001Optional reference for the originator

4. Batch Header Record (Record Type 5)

Each batch groups related payment entries — for example, all payroll deposits or all vendor payments. A single NACHA file can contain multiple batches with different SEC codes or effective dates.

5200ACME CORPORATION 1234567890PPDPAYROLL 260310260308 1021000010000001
PositionLengthField NameExample ValueDescription
11Record Type Code5Always "5" for Batch Header
2-43Service Class Code200200 = mixed debits/credits, 220 = credits only, 225 = debits only
5-2016Company NameACME CORPORATIONName of the originating company
21-4020Company Discretionary Data(spaces)Optional — for company use
41-5010Company Identification1234567890Tax ID (EIN) prefixed with "1" or assigned ID
51-533Standard Entry Class (SEC) CodePPDPPD, CCD, CTX, WEB, TEL, etc.
54-6310Company Entry DescriptionPAYROLLDescribes the purpose (shown on bank statements)
64-696Company Descriptive Date260310Optional date for descriptive purposes
70-756Effective Entry Date260308Date entries should be settled (YYMMDD)
76-783Settlement Date(spaces)Left blank — filled in by the ACH Operator
791Originator Status Code1Always "1" for originators
80-878Originating DFI Identification02100001First 8 digits of the ODFI routing number
88-947Batch Number0000001Sequential batch number within the file

5. Entry Detail Record (Record Type 6)

Each Entry Detail record represents a single ACH transaction — a credit (deposit) or debit (withdrawal) to a specific bank account. This is where the actual payment amounts and recipient details live.

62202100002140000158732 0000150000JOHNSON JAMES R 0021000010000001
PositionLengthField NameExample ValueDescription
11Record Type Code6Always "6" for Entry Detail
2-32Transaction Code2222 = checking credit, 27 = checking debit, 32 = savings credit, 37 = savings debit
4-118RDFI Routing Number02100002First 8 digits of the receiving bank's routing number
121Check Digit19th digit of the routing number (validation check)
13-2917DFI Account Number4000015873200000Recipient's bank account number (left-justified, space-padded)
30-3910Amount0000150000In cents — this equals $1,500.00
40-5415Individual ID Number(spaces)Recipient's ID (employee number, account number, etc.)
55-7622Individual NameJOHNSON JAMES RRecipient's name
77-782Discretionary Data(spaces)For originator use — usually blank
791Addenda Record Indicator00 = no addenda, 1 = addenda follows
80-9415Trace Number021000010000001ODFI routing (8 digits) + sequential number. Must be unique per entry.
Key point: The Amount field is always in cents, not dollars. A payment of $1,500.00 is represented as 0000150000.

6. Batch Control Record (Record Type 8)

The Batch Control record closes a batch and contains summary totals used for validation. Banks compare these totals against the individual entries to detect transmission errors.

820000000300630000630000000000000000004625001234567890 021000010000001
PositionLengthField NameExample ValueDescription
11Record Type Code8Always "8" for Batch Control
2-43Service Class Code200Must match the Batch Header
5-106Entry/Addenda Count000003Total number of type 6 and type 7 records in this batch
11-2010Entry Hash0063000063Sum of all RDFI routing numbers (first 8 digits) in the batch
21-3212Total Debit Amount000000000000Sum of all debit amounts in cents
33-4412Total Credit Amount000004625000Sum of all credit amounts in cents ($46,250.00 total)
45-5410Company Identification1234567890Must match the Batch Header
55-7319Message Authentication Code(spaces)Reserved — leave blank
74-796Reserved(spaces)Leave blank
80-878Originating DFI Identification02100001Must match the Batch Header
88-947Batch Number0000001Must match the Batch Header

7. File Control Record (Record Type 9)

The File Control record is the final meaningful record in a NACHA file. It contains aggregate totals across all batches in the file, serving as a final integrity check.

9000001000001000000030063000063000000000000000046250000000000000000000000000000000000000000000
PositionLengthField NameExample ValueDescription
11Record Type Code9Always "9" for File Control
2-76Batch Count000001Total number of batches in the file
8-136Block Count000001Total number of 10-record blocks
14-218Entry/Addenda Count00000003Total type 6 and type 7 records across all batches
22-3110Entry Hash0063000063Sum of all entry hash totals from all Batch Control records
32-4312Total Debit Amount000000000000Grand total of all debit amounts in cents
44-5512Total Credit Amount000004625000Grand total of all credit amounts in cents
56-9439Reserved(spaces)Leave blank

After the File Control record, the file is padded with lines consisting entirely of the digit "9" (94 nines per line) until the total number of lines is a multiple of 10. This is called blocking — the blocking factor is always 10.

8. Complete NACHA File Example

Here is a complete, annotated NACHA file. This example contains one batch with three credit entries (a payroll run paying three employees), padded to a 10-line block:

101 021000021 123456789 2603081200A094101RECEIVING BANK ACME CORPORATION REF00001 5200ACME CORPORATION 1234567890PPDPAYROLL 260310260308 1021000010000001 62202100002140000158732 0000150000JOHNSON JAMES R 0021000010000001 62202100002140000263891 0000087500MARTINEZ SARAH K 0021000010000002 62209120004220001847290 0000225000WILLIAMS DAVID L 0021000010000003 820000000300630000630000000000000000004625001234567890 021000010000001 9000001000001000000030063000063000000000000000046250000000000000000000000000000000000000000000 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
Line 1File Header (Type 1) — Identifies the originator (ACME CORPORATION) and destination (RECEIVING BANK).
Line 2Batch Header (Type 5) — PPD payroll batch from ACME CORPORATION, effective 2026-03-08.
Line 3Entry Detail (Type 6) — Credit of $1,500.00 to James R. Johnson's checking account.
Line 4Entry Detail (Type 6) — Credit of $875.00 to Sarah K. Martinez's checking account.
Line 5Entry Detail (Type 6) — Credit of $2,250.00 to David L. Williams's savings account (note transaction code 32).
Line 6Batch Control (Type 8) — 3 entries, $4,625.00 total credits, $0 debits.
Line 7File Control (Type 9) — 1 batch, 1 block, 3 entries, grand totals.
Lines 8-109-Record Padding — Three lines of all 9s to fill the block to exactly 10 lines.

9. NACHA File Format in Excel

Many businesses first encounter NACHA files when they try to build one in Excel or Google Sheets. While it is technically possible, the approach is fraught with challenges:

  • Fixed-width formatting — Every field must be padded to an exact character length. Excel's default CSV export strips leading zeros and trailing spaces, breaking the format immediately.
  • Numeric precision — Routing numbers and account numbers with leading zeros are treated as numbers by Excel, which silently drops the zeros (e.g., 021000021 becomes 21000021).
  • Hash and total calculations — The Batch Control and File Control records require computed values (entry hash, total debits, total credits, entry counts) that must exactly match the individual entries. A single error means rejection.
  • Blocking / padding — The total number of lines must be a multiple of 10, padded with 9-records. This is easy to forget.
  • No validation — Excel cannot validate routing number check digits, verify SEC code rules, or enforce NACHA compliance rules.
Bottom line: Excel can work as a data source for payment records (vendor names, account numbers, amounts), but you should not rely on it to produce the final NACHA file. A purpose-built tool like BatchPay QB can import your data and generate a fully compliant file in seconds.

10. Common NACHA File Errors

When banks reject a NACHA file, it is usually due to one of these issues:

1. Incorrect Record Length

Every record must be exactly 94 characters. Extra spaces, missing padding, or line-break issues (CRLF vs LF) are the most common culprits.

2. Invalid Entry Hash

The entry hash in the Batch Control record must equal the sum of all RDFI routing numbers (first 8 digits) from the Entry Detail records. If it does not match, the file is rejected.

3. Missing 9-Record Padding

The file must be padded with lines of all 9s so the total number of records is a multiple of 10. Missing padding causes block-count mismatches.

4. Routing Number Check Digit Failure

The 9th digit of a routing number is a check digit calculated from the first 8. An incorrect check digit makes the entire entry invalid.

5. Mismatched Batch and File Totals

The File Control record's totals must equal the sum of all Batch Control totals. Batch counts, entry counts, and dollar amounts must all reconcile.

6. Invalid or Missing Effective Entry Date

The effective entry date must be a valid business day within the bank's accepted window (typically 1-2 days in the future). Past dates or weekends/holidays are rejected.

Generate NACHA Files Automatically

Stop hand-coding ACH files or wrestling with Excel formulas. BatchPay QB connects to QuickBooks Online, pulls your bills and invoices, maps vendor banking details, and generates fully compliant NACHA files in seconds.

Frequently Asked Questions

What is a NACHA file format?

A NACHA file is a standardized flat-text file format used by banks and financial institutions to process ACH (Automated Clearing House) payments in batches. Each line is exactly 94 characters long, and the file follows a strict hierarchy of record types: File Header (1), Batch Header (5), Entry Detail (6), optional Addenda (7), Batch Control (8), and File Control (9).

How many characters are in each line of a NACHA file?

Every line (record) in a NACHA file must be exactly 94 characters long. This fixed-width format is critical — banks will reject files where any line deviates from this length.

Can I create a NACHA file from Excel?

While it is technically possible to build a NACHA file from Excel using formulas for padding and checksums, it is error-prone and not recommended for production use. Fixed-width formatting, hash totals, and entry counts must be calculated precisely. Tools like BatchPay QB automate the entire process and ensure compliance.

What are the most common NACHA file errors?

Common errors include incorrect record length (not 94 characters), invalid entry hash totals in the batch or file control records, missing 9-record padding to fill the final block of 10 lines, invalid routing number check digits, and mismatched batch counts between the file header and file control.

What is the difference between ACH and NACHA file formats?

ACH (Automated Clearing House) is the payment network, while NACHA (National Automated Clearing House Association) defines the file format specification used to submit payment instructions to that network. When people say "ACH file format" and "NACHA file format," they are referring to the same thing.

Related Articles