In this article 7 sections
If your car needs an emissions inspection, a lit check engine light can fail it before anyone looks at the tailpipe. The rules differ by state and even by county, but the core test comes from federal regulations. Here is how it works, with the specific rules in California, New York, Texas and Pennsylvania.
Quick answer: Usually not. Where a state or county runs an OBD-based emissions test, federal rules fail a vehicle when the check engine light is commanded on with a stored trouble code, or when the bulb does not light at key-on. Clearing the code right before the test rarely works, because readiness monitors reset and too many unset monitors also fail or get the car turned away.
The Federal Rule Behind OBD Emissions Tests
The EPA says the Clean Air Act requires 33 state and local areas to run vehicle inspection and maintenance (I/M) programs, and a majority of them use the onboard diagnostic (OBD) system for the test. For 1996 and newer cars, the test typically reads the onboard computer rather than the exhaust.
EPA’s test standards in 40 CFR 85.2207 and procedures in 40 CFR 85.2222 set the pass and fail logic:
- A vehicle fails if the check engine light (the malfunction indicator light, or MIL) is commanded on for one or more trouble codes.
- It fails if the computer commands the light on but the light is not actually lit on the dash.
- It fails if the light does not come on at all with the key on and engine off, even with no codes stored. This is the bulb check.
- If the light is not commanded on, the vehicle passes the OBD check even if some trouble codes are stored.

Readiness Monitors: Why Clearing the Code Backfires
California’s OBD II regulation (13 CCR 1968.2) requires every readiness monitor, the OBD system’s self-tests, to report “not complete” whenever fault memory has been cleared by a scan tool or a battery disconnect. Under the federal procedure, a car with unfinished monitors is told to come back after more driving, and fails if they are still incomplete. The federal allowance is two unset monitors for 1996 to 2000 models and one for 2001 and newer.
New York’s emissions rule (6 NYCRR 217-6.3) also counts an OBD system that fails to complete its diagnostic routines against a car, so disconnecting the battery before an inspection can backfire.
State Rules: California, New York, Texas and Pennsylvania
| State | Check engine light rule | Readiness allowance |
|---|---|---|
| California (Smog Check) | Fails if the light is on with the engine running, or if it does not light at key-on | 1996-1999 gas: any one incomplete; 2000 and newer gas: evaporative monitor only |
| New York (NYVIP3) | An illuminated light fails the emissions inspection | Readiness failures are possible |
| Texas (OBD counties) | Light commanded on with emissions codes fails regardless of readiness | 2001 and newer: two or more not-ready monitors fail |
| Pennsylvania (I/M counties) | Fails if the light is on or flashing while running, even with no codes | 1996-2000: up to two not ready; 2001 and newer: one |
California. The Bureau of Automotive Repair’s OBD test reference lists the light standards and readiness limits above. California adds another check: most 2010 and newer vehicles fail if a permanent diagnostic trouble code is stored, whether or not the light is on. BAR notes that permanent codes cannot be erased with a scan tool or by disconnecting the battery; only the car’s own OBD system clears them after confirming the fault is gone.
New York. Under NYSDEC’s emissions regulation (6 NYCRR 217-6.3), a vehicle whose MIL is illuminated with the engine running fails. A repair waiver is possible when a car fails its reinspection after documented qualifying repairs that meet a minimum cost, set in 15 NYCRR 79.25 as $450 in 1989 dollars, adjusted each year for inflation.
Texas. The Texas Commission on Environmental Quality lists 17 counties with OBD testing, in the Dallas-Fort Worth, Houston-Galveston-Brazoria, Austin and El Paso areas, with Bexar County (San Antonio) starting on November 1, 2026. Gasoline vehicles 2 to 24 years old are tested annually. TCEQ’s August 2026 program evaluation adds that on January 1, 2025, Texas ended the safety inspection for non-commercial vehicles, so cars outside emissions counties no longer need a state inspection at all.
Pennsylvania. Chapter 177 fails a car whose light is on or flashing while the engine runs, even if no codes are present, or that has codes stored with the light commanded on. Testing applies only in the state’s emissions counties, and Pennsylvania adds a gas cap test.

How to Get the Light Off and Pass
- Read the code first. Our guides cover common emissions failures such as P0455 (large EVAP leak), P0420 (catalyst efficiency), P0171 (system too lean) and P0300 (misfire).
- Check the gas cap. A loose cap is worth ruling out, and Pennsylvania even runs a separate gas cap test.
- Repair, then drive normally. The monitors need ordinary driving before they report ready. Do not clear codes on the way to the station.
- Know your model year. Readiness limits depend on it; our VIN decoder confirms it.
- Ask about warranty coverage. The EPA says that in areas with a qualifying I/M program, repairs needed because a car failed an approved emissions test are covered for 2 years or 24,000 miles, and the catalytic converter, engine computer and OBD computer for 8 years or 80,000 miles, subject to conditions.
Many repairs are modest. In the Texas evaluation, 68.1% of repair records in the Dallas-Fort Worth and Houston areas reported zero cost. Excluding those and any over $2,000, median repair costs ranged from $25 to $299 and mean costs from $82 to $415.
What If Your Area Has No Emissions Test?
The OBD check applies only where a state or local emissions program exists, and as Texas and Pennsylvania show, those programs often cover specific counties rather than whole states. Check your state DMV or environmental agency for the rules at your registration address. Even where no test applies, the light still marks a real fault worth diagnosing.
Frequently Asked Questions About Inspection With the Check Engine Light On
Will my car fail inspection if the check engine light is on?
Can I clear the code right before an emissions test?
Will a stored code fail inspection if the light is off?
How long after a repair can I pass the emissions test?
Does Texas still require a safety inspection?
Data Sources and Verification
- EPA – Vehicle Emissions On-Board Diagnostics (OBD) (archived January 2021 snapshot)
- 40 CFR 85.2207 – Onboard diagnostic test standards
- 40 CFR 85.2222 – Onboard diagnostic test procedures
- California Air Resources Board – 13 CCR 1968.2 OBD II regulation (readiness status rules)
- California Bureau of Automotive Repair – On-Board Diagnostic Test Reference
- NYSDEC – Motor Vehicle Inspection and Maintenance (I/M) Programs
- TCEQ – Highlights of the Vehicle I/M Program
- TCEQ – Evaluation of the Texas Vehicle Emissions I/M Program, Final, August 2026
- PennDOT PUB-763 – 67 Pa. Code Chapter 177, Emission Inspection Program
- EPA – Frequent questions on federal emission control warranties

Morgan Reyes is the founder and editor-in-chief of NextCarReview, which Morgan launched in August 2024. A 2022 graduate of Columbia University, Morgan is based in New York and writes and edits the site’s reviews, comparisons and buying guides. Morgan does not road-test vehicles. Every article is built from published primary data: EPA FuelEconomy.gov ratings, NHTSA crash ratings, recalls and owner complaints, IIHS results, and manufacturer specifications and pricing, with each figure cited and checked before publication. Contact: admin@nextcarreview.com
