---
title: "Codes, regulations, and who is in charge"
description: "How consensus standards differ from rules with the force of law, who regulates pipelines in the United States, and who does in Canada."
section: learn
updated: 2026-11-26
canonical: https://pipelinerepairs.com/learn/codes-regulations-and-who-is-in-charge/
markdown: https://pipelinerepairs.com/articles/learn/codes-regulations-and-who-is-in-charge.md
---

# Codes, regulations, and who is in charge

In short. How consensus standards differ from rules with the force of law, who regulates pipelines in the United States, and who does in Canada.

Newcomers often use "code," "standard," "regulation" and "guidance" as if they meant the same thing. They do not, and the difference decides what you are required to do.

## Codes and standards

A **code** or **standard** is a technical document written by a committee of experts and published by a standards body. Examples are ASME B31.4 and B31.8 for pipeline design and operation, API RP 1160 for liquid integrity management, ASME PCC-2 for repair, and CSA Z662 in Canada. They carry no legal force on their own. They become mandatory when a law, a regulator, or a contract adopts them. The documents are copyrighted and sold, which is why this site summarizes what they cover and does not reproduce them. See [how codes and regulations differ](/codes/how-codes-and-regulations-differ/).

## Regulations

A **regulation** is a rule made under a statute, enforceable by a government agency. A regulation can say "follow this standard" and name the edition, which is called incorporation by reference. In the United States, [49 CFR 192.7](https://www.ecfr.gov/current/title-49/section-192.7) is the gas-side list. The edition named is the one that binds, even if a newer edition exists.

## Guidance

Agencies also publish guidance: advisory bulletins, FAQs, interpretation letters, and research reports. Guidance explains how the agency reads the rules and can describe real failure modes, but it generally does not add new legal duties. See [using PHMSA sources](/regulations/using-phmsa-sources/) and [official guidance](/regulations/official-guidance/).

## United States

- **PHMSA**, the Pipeline and Hazardous Materials Safety Administration in the U.S. Department of Transportation, is the federal pipeline safety regulator. Its Office of Pipeline Safety runs a national program for natural gas and hazardous liquid pipelines, including regulation, inspection and enforcement. Its rules are in 49 CFR Parts 192 (gas) and 195 (hazardous liquids). See [Part 192 repair and integrity](/regulations/part-192-repair-and-integrity/) and [Part 195 repair and integrity](/regulations/part-195-repair-and-integrity/).
- **State agencies** also play a part. Pipeline safety is shared between PHMSA and state programs, and the Landowner's Guide to Pipelines explains how that split works in practice.
- **NTSB** investigates major pipeline accidents and issues recommendations. It does not write rules. See [lessons from investigations](/regulations/lessons-from-investigations/).
- Enforcement actions are public. See the [enforcement section](/enforcement/).

## Canada

There is no single national pipeline regulator in Canada. Authority depends on where the pipeline runs.

- The **Canada Energy Regulator (CER)** regulates pipelines that cross provincial or international borders. Its main safety rule for onshore pipelines is the Onshore Pipeline Regulations, supported by guidance notes and advisories. See [CER onshore pipeline regulations](/regulations/cer-onshore-pipeline-regulations/) and [CER safety and information advisories](/regulations/cer-safety-and-information-advisories/).
- **Provincial regulators** handle lines inside a province. See [Alberta](/regulations/alberta-pipeline-rules-and-aer/), [British Columbia](/regulations/bc-pipeline-regulation-and-bcer/), and [Saskatchewan and other provinces](/regulations/saskatchewan-and-other-provinces/).
- **CSA Z662** is the technical standard that these regulators generally point to. See [CSA Z662](/codes/csa-z662/).
- The **Transportation Safety Board of Canada (TSB)** investigates pipeline occurrences and publishes reports, as described in [TSB pipeline investigation reports](/regulations/tsb-pipeline-investigation-reports/).

The overview page [Canadian pipeline regulators](/regulations/canada-pipeline-regulators-overview/) shows how the pieces fit together and compares them with the U.S. structure. A conference paper on competency and training for response to unauthorized activities, pointing at the Onshore Pipeline Regulations and CSA Z662, is at [IPC2026-185953](/research/library/#ipc2026-185953).

## A practical rule of thumb

When someone says a repair "meets code," ask three things: which document, which edition, and whether the regulator that has authority over this pipeline has adopted it. The answer is rarely a simple yes or no. See [evaluating a repair product](/learn/evaluating-a-repair-product-or-pitch/).

— The Pipeline Repairs team

## Sources

- [49 CFR 192.7 — Incorporation by reference](https://www.ecfr.gov/current/title-49/section-192.7) — eCFR
- [PHMSA Office of Pipeline Safety](https://www.phmsa.dot.gov/pipeline) — PHMSA
- [Landowner's Guide to Pipelines (2011), who regulates pipeline safety](https://primis.phmsa.dot.gov/rd/FileGet/7205/Landowners_Guide_to_Pipelines.pdf) — Pipeline Safety Trust, hosted by PHMSA
- [CER Onshore Pipeline Regulations, guidance notes and related documents](https://www.cer-rec.gc.ca/en/about/acts-regulations/cer-act-regulations-guidance-notes-related-documents/onshore-pipeline/index.html) — Canada Energy Regulator
- [Pipeline transportation safety investigations and reports](https://www.tsb.gc.ca/eng/rapports-reports/pipeline/index.html) — Transportation Safety Board of Canada
