FinStackCloud
RAILS · NACHA FORMAT REFERENCE

NACHA format

Every NACHA file is plain ASCII text — no binary, no Unicode. This reference explains what's in the file: which characters are allowed, why "café" breaks production, and the byte-by-byte layout of all 7 record types.

THE ONE THING TO REMEMBER
A NACHA file is plain text, fixed at 94 bytes per line, restricted to ASCII 0x20-0x7E. No Unicode. No accents. No emoji.

It's just text — but stricter than you think

A NACHA file looks deceptively simple in a text editor: rows of digits, letters, and spaces. No XML tags, no JSON braces, no field separators. Just characters arranged in 94-column blocks, repeated until the file ends.

But "just text" is misleading. NACHA files are encoded in plain US-ASCII, and only a narrow subset of ASCII is actually allowed. If you're generating files in a modern programming language with default UTF-8 encoding, you're one customer name away from a rejection.

Allowed character range
Allowed (0x20-0x7E) Control (rejected) Extended (rejected)
NUL
SOH
STX
ETX
EOT
ENQ
ACK
BEL
BS
TAB
LF
VT
FF
CR
SO
SI
SP
!
"
#
$
%
&
'
(
)
*
+
,
-
.
/
0
1
2
3
4
5
6
7
8
9
:
;
<
=
>
?
@
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
[
\
]
^
_
`
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
{
|
}
~
DEL
é
ñ
ü
ç
ø
ß
æ
ž
😀
"
©

What happens with "Café" — a real example

Suppose you have a customer named José Café and you're putting them into the Individual Name field of an ACH entry. Here's exactly what happens at the byte level:

Input string · UTF-8 encoded Invalid for NACHA
Bytes
4A6F73 C3A9 20 436166 C3A9
José Café

Each é is encoded as two bytes (0xC3 0xA9) in UTF-8, both above the 0x7E ceiling. "José Café" looks like 9 characters but is 11 bytes — and 4 are illegal.

The two ways to handle it

✗ BAD — passes through
Jos\xC3\xA9 Caf\xC3\xA9
Rejected. 4 bytes outside ASCII range.
✓ GOOD — transliterate first
Jose Cafe
All bytes within 0x20-0x7E. Lossy but valid.

In Python: unicodedata.normalize('NFKD', s).encode('ASCII', 'ignore').decode(). In Java: Normalizer.normalize(s, Form.NFD).replaceAll("\\p{M}", ""). In Node, the any-ascii package handles transliteration well.

Don't trust your database collation alone. Even if your DB stores names in VARCHAR COLLATE utf8mb4, your ETL must transliterate before writing the file.
Catch this before your ODFI does
The Inspector flags every byte outside 0x20-0x7E with line and column.
Open Inspector →

File structure — 4 levels of nesting

A NACHA file is a tree with four levels of nesting. The file wraps batches, batches wrap entries, and entries optionally wrap addenda. Every record is exactly 94 bytes regardless of which level it lives at.

The level a record lives at matters more than its numeric type code. We've color-coded the levels below — once you internalize the hierarchy, the record types are easy.

Record anatomies — every field, every byte

Each section below shows the 94-byte layout of one record type, followed by a complete field-by-field reference. The colored band at the top maps directly to the field list — same color, same position.

FILE LEVEL

File Header Type 1 · 1 per file

The first record in any NACHA file. Identifies the routing of the file, when it was created, and bookkeeping fields like the file ID modifier (used to distinguish multiple files sent on the same day).

File Header · 94 bytes · 13 fields
1
M
1
1 4 14 24 30 34 40 41 64 87 94
1
Record Type Code
Always 1 — identifies this as a File Header.
1 char
Fixed "1"
2-3
Priority Code
Always 01. Reserved for future routing priority differentiation.
2 chars
Fixed "01"
4-13
Immediate Destination
10-digit routing number of the bank receiving the file. Right-justified, leading space if 9 digits.
10 chars
Alphanum
14-23
Immediate Origin
10-character ID of the bank sending the file (typically routing number with leading space).
10 chars
Alphanum
24-29
File Creation Date
Date the file was created in YYMMDD format. Often used by RDFIs for sequencing.
6 digits
Numeric
30-33
File Creation Time
Time of creation in HHMM format (24-hour). Optional but most ODFIs populate it.
4 digits
Numeric
34
File ID Modifier
Single uppercase letter or digit (A-Z or 0-9) used to distinguish multiple files sent on the same day from the same originator.
1 char
Alphanum
35-37
Record Size
Always 094 — the byte length of every record in the file.
3 digits
Fixed "094"
38-39
Blocking Factor
Always 10 — number of records per "block" (a relic of mainframe origins).
2 digits
Fixed "10"
40
Format Code
Always 1.
1 char
Fixed "1"
41-63
Immediate Destination Name
Free-text name of the destination bank (often "Federal Reserve Bank" or the receiving FI). Left-justified, space-padded.
23 chars
Alphanum
64-86
Immediate Origin Name
Free-text name of the originating bank or company. Left-justified, space-padded.
23 chars
Alphanum
87-94
Reference Code
Optional. Sender's internal reference for the file. Most originators leave it blank.
8 chars
Optional
BATCH LEVEL

Batch Header Type 5 · 1+ per file

Opens each batch. The most operationally important record — its SEC code (PPD, CCD, WEB...) determines which NACHA rules apply to all entries in the batch, including return windows, authorization requirements, and addenda format.

Batch Header · 94 bytes · 13 fields
5
1
1 5 21 41 51 54 64 70 76 79 80 88 94
1
Record Type Code
Always 5.
1 char
Fixed "5"
2-4
Service Class Code
200 = mixed debits/credits, 220 = credits only, 225 = debits only, 280 = automated accounting advices.
3 digits
Numeric
5-20
Company Name
Name of the originating company as it will appear on the receiver's bank statement. Left-justified, space-padded.
16 chars
Alphanum
21-40
Company Discretionary Data
Free-form field for originator's internal use. Often left blank.
20 chars
Optional
41-50
Company Identification
10-character originator ID. Typically EIN/TIN prefixed with 1 (e.g., 1123456789) or 9 for non-tax IDs.
10 chars
Alphanum
51-53
SEC Code
Standard Entry Class (PPD for consumer prearranged, CCD for corporate, WEB for web-authorized). Determines which rules apply.
3 chars
Alpha
54-63
Company Entry Description
Free text describing entries (e.g., PAYROLL , RENT ). Visible to receivers on their statement.
10 chars
Alphanum
64-69
Company Descriptive Date
Optional descriptor (typically YYMMDD or free-form like JAN 06). Shown on receiver statement.
6 chars
Alphanum
70-75
Effective Entry Date
Settlement date the originator wants entries to post (YYMMDD). Must be a banking day.
6 digits
Numeric
76-78
Settlement Date (Julian)
Filled by ACH operator on output. Originator inserts 3 spaces.
3 chars
Operator-filled
79
Originator Status Code
Always 1 for ODFI-originated entries.
1 char
Fixed "1"
80-87
Originating DFI Identification
First 8 digits of the ODFI's routing number (without check digit). Used to construct trace numbers.
8 digits
Numeric
88-94
Batch Number
Sequential number for this batch within the file. First batch is 0000001.
7 digits
Numeric
ENTRY LEVEL

Entry Detail Type 6 · 1+ per batch

The actual money. Each Entry Detail represents one payment — a debit from or credit to a single account. The Transaction Code (positions 2-3) determines whether it's a checking debit, savings credit, prenote, etc. The trace number (positions 80-94) uniquely identifies the entry within the ACH network.

Entry Detail · 94 bytes · 11 fields
6
C
1
1 4 12 13 30 40 55 77 79 80 94
1
Record Type Code
Always 6.
1 char
Fixed "6"
2-3
Transaction Code
22 = checking credit, 27 = checking debit, 32 = savings credit, 37 = savings debit. Prenotes use 23/28/33/38.
2 digits
Numeric
4-11
Receiving DFI Identification
First 8 digits of the receiver's bank routing number (the ABA without the check digit).
8 digits
Numeric
12
Check Digit
9th digit of the receiver's routing number, calculated by ABA Mod-10. Must be valid or entry will be rejected.
1 digit
Numeric
13-29
DFI Account Number
Receiver's account number at the RDFI. Left-justified, space-padded. Up to 17 chars; some banks accept hyphens but most strip them.
17 chars
Alphanum
30-39
Amount
10 digits in cents, zero-padded. 0000010000 = $100.00. Max 9999999999 = $99,999,999.99.
10 digits
Numeric
40-54
Individual Identification Number
Originator's reference (employee ID, customer ID, invoice number). Optional but useful for reconciliation.
15 chars
Alphanum
55-76
Individual Name
Receiver's name. Left-justified, space-padded. This is where Unicode breaks — must be ASCII-only. Required for consumer entries (PPD, WEB, TEL).
22 chars
Alphanum
77-78
Discretionary Data
Free 2-char field. Some SEC codes (CIE, MTE) repurpose this for specific data.
2 chars
Alphanum
79
Addenda Record Indicator
0 = no addenda follows. 1 = at least one Type 7 Addenda follows.
1 digit
0 or 1
80-94
Trace Number
15-digit unique ID. First 8 digits = ODFI routing prefix; last 7 = sequential entry number within the batch.
15 digits
Numeric
ADDENDA LEVEL

Addenda Type 7 · 0+ per entry

Optional remittance information attached to an Entry Detail. The format of positions 4-83 (Payment Related Information) varies dramatically by SEC code: PPD allows 1 free-text addenda, CCD allows 1, but CTX can carry up to 9,999 structured ANSI X12 segments. IAT entries require 7 specific addenda types in fixed order.

Addenda format depends on SEC code. The structure below is generic. For SEC-specific addenda layouts (CTX X12 segments, IAT 7-addenda sequence, etc.), see SEC codes reference (coming soon).
Addenda · 94 bytes · 5 fields (generic)
7
1 4 84 88 94
1
Record Type Code
Always 7.
1 char
Fixed "7"
2-3
Addenda Type Code
05 = generic remittance (PPD/CCD/CTX). 02 = MTE/POS/SHR. 10-18 = IAT-specific. 98 = NOC. 99 = Return.
2 digits
Numeric
4-83
Payment Related Information
80-character free or structured field. Format depends on SEC code: free text for PPD; X12 segments for CTX; specific structured fields for IAT addenda types 10-18.
80 chars
Alphanum
84-87
Addenda Sequence Number
Sequential within the parent entry. First addenda is 0001, second is 0002, etc. Resets per entry.
4 digits
Numeric
88-94
Entry Detail Sequence Number
Last 7 digits of the parent Entry Detail's trace number. Links the addenda to its parent entry.
7 digits
Numeric
BATCH LEVEL

Batch Control Type 8 · 1 per batch

Closes each batch with totals that must exactly match the entries in the batch. The entry hash and dollar totals are checksums — if they don't match, the entire batch is rejected. This is the most common cause of batch-level validation failures.

Batch Control · 94 bytes · 9 fields
8
1 5 11 21 33 45 55 74 80 94
1
Record Type Code
Always 8.
1 char
Fixed "8"
2-4
Service Class Code
Must match the Batch Header's Service Class Code. 200 / 220 / 225 / 280.
3 digits
Numeric
5-10
Entry / Addenda Count
Total Entry Detail (Type 6) plus Addenda (Type 7) records in this batch.
6 digits
Numeric
11-20
Entry Hash
Sum of the first 8 digits of every Entry Detail's RDFI Routing Number, taking the rightmost 10 digits of that sum. A checksum, not a true hash.
10 digits
Numeric
21-32
Total Debit Amount
Sum of all debit entries' amounts (in cents), zero-padded. Must match the actual sum.
12 digits
Numeric
33-44
Total Credit Amount
Sum of all credit entries' amounts (in cents), zero-padded. Must match the actual sum.
12 digits
Numeric
45-54
Company Identification
Must match the Batch Header's Company Identification field exactly.
10 chars
Alphanum
55-73
Message Authentication Code
Optional MAC for cryptographic verification. Almost always blank (19 spaces).
19 chars
Optional
74-79
Reserved
6 spaces. Reserved for future use.
6 chars
Reserved
80-94
Originating DFI ID + Batch Number
Positions 80-87: Must match Batch Header's ODFI ID. Positions 88-94: Must match Batch Header's Batch Number.
15 chars
Numeric
Most batch rejections come from this record. If your debit total, credit total, entry count, or entry hash doesn't match the actual entries — the whole batch fails. Always recompute these values when generating files; never copy from a previous run.
FILE LEVEL

File Control Type 9 · 1 per file

The mirror image of File Header — closes the file with file-wide totals. Just like Batch Control, every total here must exactly match the sum of the corresponding values across all batches.

File Control · 94 bytes · 8 fields
9
1 2 8 14 22 32 44 56 94
1
Record Type Code
Always 9.
1 char
Fixed "9"
2-7
Batch Count
Total number of Batch Header (Type 5) records in the file, zero-padded to 6 digits.
6 digits
Numeric
8-13
Block Count
Total number of physical blocks in the file. Each block = 10 records (the blocking factor), so block count = ceil(total records / 10).
6 digits
Numeric
14-21
Entry / Addenda Count
Total Type 6 (Entry Detail) + Type 7 (Addenda) records across the entire file.
8 digits
Numeric
22-31
Entry Hash
Sum of all batches' Entry Hash values, taking the rightmost 10 digits of that sum.
10 digits
Numeric
32-43
Total Debit Amount
Sum of all debit amounts across all batches in the file, in cents, zero-padded.
12 digits
Numeric
44-55
Total Credit Amount
Sum of all credit amounts across all batches in the file, in cents, zero-padded.
12 digits
Numeric
56-94
Reserved
39 spaces. Reserved for future use.
39 chars
Reserved
FILE LEVEL

9-Padding Records Type 9 · 0+ per file

Optional filler rows appended after the File Control record so the total number of records in the file is a multiple of 10 (the blocking factor). Each padding record is exactly 94 nines: "99999...9". They carry no data — they exist purely to satisfy the legacy mainframe block-alignment requirement.

Modern parsers ignore these records entirely. If you're generating a file, use this formula:

padding_count = (10 - (total_records % 10)) % 10

...and write that many lines of 94 nines.

See your file's anatomy
Drop a NACHA file into the Inspector. Every record gets the same field-by-field breakdown you see above — color-coded to match.
Open Inspector →