EDI HIPAA De-Identifier & PHI Sanitizer
100% client-side HIPAA Safe Harbor (45 CFR § 164.514(b)) de-identifier to mask patient names, SSNs, member IDs, DOBs, and addresses in 837/835/270 transactions with audit logging.
Client-Side Execution & Privacy Guarantee
This utility executes 100% locally in your web browser. Your inputs, tokens, queries, and data payloads are never transmitted to any external server or backend.
The EDI HIPAA De-Identifier applies the Safe Harbor method defined in 45 CFR § 164.514(b) directly to ANSI X12 healthcare transactions. It runs entirely in the browser, so protected health information never leaves the machine while names, Social Security numbers, member identifiers, dates of birth, and geographic details smaller than a state are replaced or redacted.
The tool is intended for analysts, testers, and researchers who need realistic claim or eligibility files for development and quality assurance without retaining identifiable patient data. An append-only audit log records every transformation so the de-identification process itself can be reviewed.
Safe Harbor Identifier Removal
Safe Harbor requires the removal of eighteen categories of identifiers. Inside 837 professional or institutional claims, 835 remittance advice, and 270/271 eligibility inquiries the sanitizer targets the segments that commonly carry those identifiers: NM1 (names and identifiers), REF (member and claim numbers), DMG (date of birth and gender), N3/N4 (street address, city, and ZIP), and PER (telephone or email).
Direct identifiers are replaced with consistent pseudonyms or fixed masks (for example SSN becomes XXX-XX-XXXX, member ID becomes a hashed token of fixed length). Dates of birth are reduced to year only, or removed entirely when the age would exceed 89. ZIP codes retain only the first three digits when the corresponding geographic unit meets the population threshold; otherwise they become 000.
Transaction-Specific Handling
For 837 claims the tool walks the subscriber, patient, and billing-provider loops, masking only the patient and subscriber identifiers while leaving provider NPI and tax-ID fields intact unless the user explicitly requests full redaction. On 835 remittances it focuses on the CLP and NM1 loops that identify the patient. Eligibility 270/271 messages have their NM1 and DMG segments sanitized in the same pass.
Loop structure, segment counts, and envelope control numbers remain unchanged so the resulting file continues to parse and can still be validated against an implementation guide. Only the element values that constitute PHI are altered.
Audit Logging and Reversibility
Every replacement is recorded in a local audit log that lists the segment, element position, original value length (never the value itself), and the mask that was applied. The log can be downloaded separately for compliance documentation.
Because the transformation is deterministic for a given salt, the same patient identifier always maps to the same token within one run. This preserves referential integrity across multiple claims for the same individual while still satisfying Safe Harbor. No re-identification key is stored unless the user explicitly enables an optional reversible mode for internal testing.
When to use this tool
- Prepare production 837 claim files for use in a development or staging environment.
- Share sample remittance data with a vendor without exposing patient identifiers.
- Create training sets for claims-adjudication staff that contain no PHI.
- Satisfy a research-data request that requires de-identified healthcare transactions.
- Document the de-identification steps taken before a file is archived or transferred.
How to use the EDI HIPAA De-Identifier & PHI Sanitizer
- Drop or paste an 837, 835, or 270/271 X12 file.
- Select the Safe Harbor profile (default) or a custom mask set.
- Optionally supply a salt so that the same identifiers produce the same tokens across runs.
- Choose whether dates should retain the year or be fully redacted.
- Run the sanitizer; the masked EDI and the audit log appear side-by-side.
- Download both artifacts and verify a sample of segments against the log.
Worked examples
837 patient NM1 and DMG
NM1*IL*1*DOE*JANE****MI*123456789~ DMG*D8*19850315*F~
NM1*IL*1*PATIENT*A****MI*XXXXXXXXX~ DMG*D8*1985*F~
Name is replaced by a consistent token; SSN/member ID is masked; birth date retains only the year.
Address and ZIP redaction
N3*123 MAIN STREET~ N4*SPRINGFIELD*IL*62704~
N3*REDACTED~ N4**IL*627~
Street address is removed; city is removed; ZIP is reduced to the first three digits.
Common mistakes and tips
- Always run the sanitizer on a copy; the original file is never modified in place.
- Verify that provider NPIs and payer IDs you intend to keep were not accidentally included in a custom mask rule.
- The audit log contains no original PHI, only metadata, so it can be stored with the de-identified file.
- For files that also contain 999 acknowledgments, process only the claim transactions; acknowledgments rarely contain PHI.
- After masking, re-validate the file with an EDI validator to confirm segment counts and control numbers remain correct.
Frequently asked questions
Does this implement the full Safe Harbor method?
It removes the identifier categories that appear in standard 837, 835, and 270/271 segments and produces an audit log. Final determination that no residual risk remains is still the covered entity’s responsibility.
Can the original values be recovered?
By default the transformation is one-way. An optional reversible mode stores a local mapping that can be used only on the same machine and only if the user explicitly enables it.
Are dates other than birth dates affected?
Admission, discharge, and service dates are left intact unless they are known to be directly identifying; the tool focuses on the Safe Harbor date elements that relate to the individual.
What about EDIFACT healthcare messages?
The current implementation targets ANSI X12. EDIFACT messages used in some international claims can be processed if their segment structure maps to the same identifier locations.
Is the process suitable for production de-identification under HIPAA?
It provides a client-side Safe Harbor implementation with audit logging. Organizations should still apply their own risk assessment and, where required, expert determination for residual risk.