Validating Bacs 100-character records and Standard 18 envelopes
UK bulk bank clearing packs each payment instruction into a fixed-length text line alongside optional tape header labels. When you validate a UK Bacs payroll file offline, the Web Worker decodes files up to 25 MB and measures every non-empty row against strict 100 bytes and 106 bytes record widths.
Governed by Pay.UK Bacs Payment System guidance, full Standard 18 batches wrap payment instructions inside VOL1, HDR1, HDR2, and UHL1 header labels plus EOF1, EOF2, and UTL1 trailers. Raw bureau extracts without tape envelopes remain readable here, emitting a clear NO_ENVELOPE warning so you recognize missing trailers.
Byte positions, transaction codes, and raw extract warnings
Fixed-width parsers check Bacs 100 character record width and sort codes by slicing strict 1-based byte coordinates on each row. Rows measuring neither 100 bytes nor 106 bytes trigger a RECORD_LENGTH error, while enveloped batches missing UTL1 flag a MISSING_UTL1 error.
| 1-based bytes | Field name | Length | Validation rule checked locally |
|---|---|---|---|
1-6 |
Destination sort code | 6 | Must be 6 numeric digits and not 000000 |
7-14 |
Destination account | 8 | Strictly 8 digits (DEST_ACCOUNT on mismatch) |
16-17 |
Transaction code | 2 | Accepts 01, 17, 18, 19, 99, Z4, Z5, 0N, 0C, 0S |
18-23 |
Originating sort code | 6 | Checked for 6-digit UK clearing syntax |
32-35 |
Free format / RTI hash | 4 | Counts entries starting with / for HMRC RTI |
36-46 |
Amount in pence | 11 | Zero-padded integer pence scaled into GBP |
65-82 |
Reference / CONTRA | 18 | Flags CONTRA rows and checks allowed ASCII symbols |
101-106 |
Row processing date | 6 | Optional Julian YYDDD resolved to ISO 8601 |
Supported codes span Direct Debit collections (01, 17, 18, 19), Direct Credits (99), interest and dividends (Z4, Z5), and AUDDIS instructions (0N, 0C, 0S). Comparing enveloped STD18 versus raw Bacs file extracts helps pinpoint whether an accounting package trimmed tape headers or corrupted line padding.
Checking destination and originating sort codes before submission
Both destination and originating sort codes must pass six-digit structure checks, and any invalid code appears highlighted in red bold text inside the preview grid. Built-in mappings recognize major UK clearing prefixes (20 Barclays, 30 Lloyds, 40 HSBC, 60 NatWest, 77 TSB) alongside modern ranges including Monzo, Starling, Revolut, Metro, and Wise.
When troubleshooting a single supplier mandate before generating a batch file, run individual bank numbers through the UK sort code checker to confirm branch bank formatting before inserting them into payroll exports.
How do sort-code validation, CONTRA balancing, and UTL1 checks work?
Local pre-submission checks inspect six-digit routing prefixes, debit-credit equilibrium, and file-end byte counters inside your browser tab. Passing every structural check displays the green BACS STD18 checks PASS status badge, whereas line mismatches list exact row numbers inside the issue log above the preview table.
Offline clearing prefix checks versus EISCD modulus directories
This checker performs deterministic client-side format validation by rejecting non-numeric strings or 000000 placeholders and labeling recognized UK clearing institutions. No external API calls occur during checking, keeping sensitive employee sort codes and account digits isolated inside your browser memory.
Unlike offline syntax checks, live bank branch modulus weight verification relies on commercial clearing tables published in the Pay.UK Extended Industry Sort Code Directory overview alongside bank Confirmation of Payee checks. Always confirm newly onboarded payees through your bank portal even when batch syntax passes cleanly.
Reconciling Julian UHL1 dates, CONTRA debits, and UTL1 totals
Envelope inspection includes UHL1 Julian YYDDD processing date validation by confirming leap-year day bounds (1..366 vs 1..365) and resolving ISO 8601 processing dates cleanly alongside the 6-digit Service User Number (SUN). Whenever CONTRA lines exist, cumulative credit pence must match cumulative debit pence exactly or CONTRA_IMBALANCE fires.
To fix a UTL1 debit-credit total mismatch in Bacs exports, confirm if your payroll software counted CONTRA rows inside the UTL1 user trailer totals. The UTL1 slice checks four totals including contra items: debit pence (4..17), credit pence (17..30), debit item count (30..37), and credit item count (37..44).
Payment teams managing Commonwealth disbursements outside the UK often validate fixed-width bank files under similar batch control concepts. You can compare Bacs totals alongside the Australian 120-character Cemtex ABA validator when reconciling dual-region payroll runs.
Auditing HMRC RTI Bacs hashes and masked Excel reports
Payroll teams running Real Time Information submissions rely on four-character cross-reference markers embedded inside each payment line. Alongside SUN and processing date metadata, the header bar tallies active RTI hashes and sidebar counters summarize Payment lines, Contra lines, Credits (excl contra), and Debits (incl contra).
Inspecting 4-character RTI hashes and allowed reference characters
Positions 32-35 hold an optional four-character free-format marker, and payment entries beginning with / increment the RTI hash counter automatically. As outlined in GOV.UK HMRC PAYE payroll reporting guidance, HMRC matches those random four-character hashes between Bacs salary credits and Full Payment Submission filings.
Reference fields (65-82) and narrative labels also undergo character hygiene verification against permitted Bacs uppercase characters (A-Z, 0-9, space, period, slash, ampersand, and hyphen). Unexpected punctuation emits a REFERENCE_CHARSET warning so payment bureaus clean stray symbols before gateway upload.
Comparing three-sheet Excel reports against 15-column CSV downloads
To export a BACS STD18 report to Excel with masked accounts, Excel workbook (.xlsx) is pre-selected under Export format alongside checked **Mask 8-digit bank accounts (**1234) mode. Clicking Export BACS report builds three structured tabs: Payments, Envelope & Totals, and Validation Checks, while UI previews cap smoothly at 300 rows.
Switching to Payments CSV (.csv) generates a 15-column RFC 4180 UTF-8 BOM spreadsheet detailing line numbers, record kind, transaction code, destination bank, masked accounts, GBP amounts, originator metadata, RTI hash field, and processing dates.
Before exporting, review the Envelope & Totals sheet or header bar to verify currency flags (00 or blank defaulting to GBP) and volume serials parsed from VOL1 (4..10). After UK payroll checks, finance teams filing statutory accounts can also inspect tagged HMRC and Companies House iXBRL filings locally.
Direct Debit safeguards, client-side privacy, and reconciliation limits
Payroll registers and customer bank mandates require strict handling before finance teams upload clearing batches to bank portals. Every check executes 100% locally inside an on-demand Web Worker up to 25 MB, transmitting zero bytes over the network and neutralizing formula characters (=, +, -, @, |) in CSV output.
Before running a live extract, click Load sample BACS STD18 to explore harbor-uk-payroll.bacs containing VOL1, HDR1, HDR2, UHL1, two code 99 salary credits with /A1B and /C2D RTI hashes, one code 17 CONTRA debit, and EOF1/EOF2/UTL1 trailers. Collections under codes 01, 17, 18, 19, and AUDDIS remain subject to Direct Debit Guarantee safeguards regarding customer advance notice and bank indemnity refunds.
Tip: Leave **Mask 8-digit bank accounts (**1234) enabled when emailing Export BACS report spreadsheets to managers for payment sign-off, and uncheck it only inside secured internal bank reconciliation archives.
Once Bacs runs settle through clearing, treasury staff often match corporate bank statements back against original submission totals. You can run offline ISO 20022 CAMT.053 parsing before ledger import inside the same local browser suite without exposing bank feeds.
This Bacs Standard 18 checker provides structural, checksum, and arithmetic diagnostics for informational purposes only and does not constitute accounting, payroll, tax, or financial advice. Verify live sort-code reachability, modulus checks, and statutory PAYE filings with your sponsoring Bacs bank and a qualified accountant.