Skip to main content

N4 — Geographic Location

X12 N4 segment reference: city, state/province, postal code, and country that complete an N1/N3 address block for ship-to and remit-to routing.

N4 segment facts

  • N4 completes the geographic part of an N1 address block — city, state, postal, and country used for routing and tax logic.
  • State and postal-code validation in N4 is a common silent failure point for cross-DC and cross-border shipments.
  • SignalEDI validates N4 state/postal formats against partner profiles before outbound documents leave the sandbox.

What the N4 segment does

N4 completes the address for a party in an N1 loop by carrying city, state or province, postal code, and country code. It follows N3 street lines and is used for routing and tax determination.

Loop: N1 loop (after N3)

Common transaction sets: 850, 856, 810, 855

Key elements

ElementNameDescription
N401City nameCity for the party's address.
N402State or province codeTwo-character code; required by most US partners.
N403Postal codeZIP or postal code; format validated by partner rules.
N404Country codeISO country code; often US when omitted.

Example N4 segment

N4*Columbus*OH*43004*US~

Parse and validate samples with the free EDI validator or send JSON via the JSON→X12 mapping guide.

Common N4 errors

  • Invalid or missing state code for a US ship-to
  • Postal code format mismatch (ZIP+4 vs 5-digit) against partner spec
  • N4 present without the preceding N1/N3 context

Related reference

Frequently asked questions

Built for SMB teams that need API-first EDI, healthcare diligence, and predictable pricing.

SignalEDI keeps the public promise consistent across every route: real-time processing, transparent monthly plans, no per-document fees on core plans, QuickBooks-friendly handoffs, and core healthcare X12 workflows on paid plans.

Supports HIPAA complianceBAA path documentedSecure API + webhooksNo per-document fees on core plans

Operations teams

A supplier operations team can see partner setup, validation, exceptions, and QuickBooks handoff in one workspace instead of chasing spreadsheets.

Healthcare billing

837, 835, and 270/271 workflows are explained in plain English, with handling that supports HIPAA compliance and a documented BAA review path for diligence.

Developer teams

JSON/CSV in and X12 out, with API docs, webhooks, real-time status, and validation responses that make EDI feel like modern infrastructure.

Preview case studies

© 2026 SignalEDI Inc. All rights reserved.