EDI Validator
Check X12 documents for structural and segment-level errors before sending to trading partners.
Available at /dev/validate — developer accounts only.
What does the validator check?
| Check | What it catches |
| Envelope structure | ISA/IEA, GS/GE, and ST/SE segment pairing and control number matching |
| Segment order | Segments appearing outside their expected loop or in the wrong sequence |
| Required elements | Mandatory data elements that are missing or empty |
| Element length | Values that exceed the maximum or fall below the minimum allowed character count |
| Data type | Numeric fields containing non-numeric data, date fields with invalid dates, etc. |
| Delimiter consistency | Element, segment, and component separators that don't match the ISA header declaration |
Running a validation
- Go to /dev/validate
- Paste your X12 document into the text area — or drag and drop a file
- Click Validate
- Results appear below:
- Green / Valid — no errors found, document is structurally correct
- Red / Errors — a numbered list of each error with the segment position and error code
Understanding error output
Each error entry shows:
- Segment index — which segment in the document (e.g. Segment 14)
- Segment ID — the three-letter code (e.g.
PO1, N1)
- Element position — which element within the segment (e.g. Element 3)
- Error code — the X12 standard error code
- Description — a plain-English explanation of what's wrong
AI Error Explanation
Click Explain with AI on any error to get:
- A plain-English explanation of what caused the error
- The X12 spec requirement being violated
- A suggested fix with an example of the corrected segment
Each AI explanation costs 1 credit. Your balance is shown at the top of the validator page.
⚠️
Always validate outbound X12 documents before sending them to trading partners. A rejected 850 or 856 can trigger chargebacks and compliance penalties from large retailers like Walmart, Target, or Amazon.
Validation vs. Trading Partner Compliance
The validator checks the X12 standard — but trading partners often add their own requirements on top:
specific qualifier codes, value set restrictions, or segment usage that differs from the base spec.
Passing the x12port validator means your document is structurally valid X12, but your trading partner
may still reject it if it doesn't meet their specific implementation guide (IG).
For trading-partner-specific compliance checking, consult your partner's EDI implementation guide
or contact your x12port developer support.
Tips
- Validate before mapping — if you're receiving inbound X12, validate it first to catch upstream issues before building rules against a malformed document.
- Check after conversion — if your mapper outputs X12, validate the output to confirm the envelope and segment structure is correct.
- Save to Vault — after a successful validation, save the document to your vault as a known-good baseline sample.