Learn

UWI formats: US vs. Canada

Every well needs exactly one identity. The US and Canada solved that problem in opposite ways — a sequential registry number versus an identifier that encodes the well's location — and mixing up their rules corrupts databases quietly.

By WellSchema Engineering ·

A unique well identifier (UWI) is the primary key of the oilfield: the one string that regulators, partners, data vendors and your own databases agree refers to the same hole in the ground. North America has two incompatible conventions, and most well-header data problems trace back to treating one like the other.

One well, one identity: this example carries US-style well number 42-165-01234 — Texas (42), Gaines County (165), well serial 01234.

The US: the API well number

The US uses the API well number (today formally the US Well Number, stewarded by the PPDM Association after the API retired the standard). It is a sequential registry number: it tells you where to look a well up, not where the well is. The base number is 10 digits, extended to 12 or 14 for sidetracks and well events:

DigitsFieldExample (42-165-01234-01-02)
1–2State code42 = Texas
3–5County or parish code165 = Gaines County
6–10Unique well serial, assigned by the state regulator01234
11–12 (optional)Directional sidetrack code — 00 is the original hole01 = first sidetrack
13–14 (optional)Event sequence code (recompletions, operations)02

Punctuation is not part of the standard — 4216501234, 42-165-01234 and 42-165-01234-01-02 can all refer to the same wellbore at different levels of detail. Databases should store the digits and treat dashes as display formatting.

Canada: a location-based UWI

Canada took the opposite approach: the 16-character Canadian UWI (a CAPP/PPDM standard) encodes the well's legal survey location. For wells on the Dominion Land Survey (Alberta, Saskatchewan, Manitoba and parts of BC), the familiar display form is:

100/04-11-084-06W6/00 — survey system (1), location exception (00), legal subdivision 04, section 11, township 084, range 06, west of the 6th meridian, event sequence 00.
  • Position 1 — survey system: 1 = DLS, 2 = NTS (British Columbia), 3 = federal permit areas, 4 = geodetic coordinates.
  • Location exception + legal location: the LSD / section / township / range / meridian chain that puts the well on the map — the same string a landman would quote.
  • Event sequence (last position): distinguishes drilling and completion events at the same location — the counterpart of the US 13th–14th digits.

Because the UWI encodes location, two wells drilled a section apart get visibly different identifiers — and a typo usually produces a location that does not exist, which makes Canadian UWIs partially self-validating.

Side by side

US API / US Well NumberCanadian UWI
Length10, 12 or 14 digits16 characters
EncodesRegistry: state, county, serialLocation: survey system + legal location
Assigned byState regulatorProvincial regulator (AER, BCER, …)
Sidetracks / eventsDigits 11–12 and 13–14Event sequence character(s)
Self-checking?No — any 10 digits look plausiblePartially — invalid locations stand out

The pitfalls that actually corrupt data

  • Storing well numbers as integers. State codes and serials keep leading zeros; an integer column silently turns 05-001-00123 into 500100123. UWIs are text, always.
  • Mixing display and storage formats. Decide once whether dashes/slashes are stored or applied at display time, and validate on entry — a format regex catches most transposition errors at the door.
  • Ignoring the event/sidetrack suffix. The 10-digit API number identifies a surface well; the sidetrack digits identify the wellbore. Joining datasets at the wrong level double-counts production or loses laterals.
  • Assuming one country's rules. A validator that accepts "anything numeric" will happily accept a Canadian UWI with its letters stripped — and now the record matches nothing.

The fix is unglamorous: validate the format on entry against the convention the well actually belongs to, store the canonical string, and format for display separately. It is a few lines of code that saves years of reconciliation.