What clearing a code means and why you might do it
When your car's check engine light comes on, your vehicle's computer has stored a diagnostic trouble code — a record of a problem it detected. Clearing the code erases that record from the computer's memory, which turns off the light. The code itself does not disappear from existence; it stays in the car's history, but the active alert stops.
You clear codes when you have fixed the underlying problem — a loose gas cap, a faulty oxygen sensor, a misfire in one cylinder — and want to confirm the fix worked. If you clear a code without fixing what caused it, the light will come back on within a few driving cycles, usually within a few days or weeks.
Clearing a code is not the same as fixing the problem. The light going off means the computer is no longer detecting that specific fault right now, but if the fault returns, so will the code.
Key Takeaways
- You can clear codes yourself using an OBD-II scanner, which plugs into a port under your steering wheel and costs $25 to $100 for a basic model.
- A mechanic or auto parts store can clear codes for you, often for free or a small fee, and can also tell you what the code means before you clear it.
- Clearing a code without fixing the problem will cause the light to return within days or weeks of normal driving.
- Some codes require a specific sequence of steps to clear permanently, so reading what the code means first saves you time and frustration.
Using an OBD-II scanner to clear codes yourself
An OBD-II scanner is a handheld device that reads and clears diagnostic codes. Every car made after 1996 has an OBD-II port, usually located under the steering wheel on the left side of the dashboard, or sometimes on the right. The port looks like a rectangular connector with 16 pins.
To clear a code with a scanner: turn the ignition to the "On" position without starting the engine, plug the scanner into the OBD-II port, navigate to the "Clear Codes" or "Erase Codes" menu on the scanner's screen, and confirm. The scanner will display a message when the codes are cleared. Turn off the ignition and unplug the scanner.
Basic OBD-II scanners that only read and clear codes cost between $25 and $60. More advanced scanners that show live data and freeze frame information cost $100 to $300. For a one-time code clear, a basic model is enough. Many auto parts stores lend or rent scanners for free if you buy a part from them, so you may not need to buy one at all.
Having a mechanic or auto parts store clear codes
Most independent mechanics and all chain auto parts stores — Autozone, O'Reilly, Advance Auto Parts, NAPA — will read your diagnostic codes for free. Many will also clear them for free or charge a small fee, usually $10 to $20. This route is useful if you want to know what the code means before you clear it, or if you are not comfortable using a scanner yourself.
Call ahead and ask whether they clear codes for free, because policies vary by location. Some stores will clear codes only if you buy a part from them; others will do it as a courtesy. When you go in, bring your keys and be ready to let them plug in their scanner while your car is parked in their lot.
A dealership will also clear codes, but they typically charge a diagnostic fee — $100 to $150 — even if the code clear itself takes five minutes. Use a dealership only if you need other work done at the same time, or if your car is still under warranty and the code relates to a covered component.
Understanding what the code means before you clear it
Every diagnostic code is a five-character alphanumeric string that starts with P, U, B, or C. A code like P0420 means the catalytic converter is not working efficiently. P0171 means the engine is running too lean. U codes relate to network communication problems; B codes relate to body systems like airbags; C codes relate to chassis systems like brakes.
Before you clear a code, write down the exact code number and look it up online or ask the mechanic what it means. Some codes point to a straightforward fix — a loose gas cap, a disconnected hose — that you can address yourself. Others point to expensive repairs like a failing transmission or catalytic converter. Knowing what you are dealing with helps you decide whether to clear the code now or wait until you can address the root cause.
If you clear a code without fixing the underlying problem, the code will return. This is not harmful to your car, but it wastes your time. The exception is codes that are triggered by a one-time event — a sensor glitch, a temporary fuel pressure drop — that may not recur even if you do nothing.
What happens after you clear a code
After you clear a code, your check engine light will turn off when ready. Your car will then enter a monitor cycle, a period of normal driving during which the computer re-tests the systems that triggered the code. This cycle usually takes a few days to two weeks of mixed city and highway driving.
If the problem is fixed, the code will not return and the light will stay off. If the problem still exists, the code will return within this monitor cycle, and the light will come back on. Some codes return faster than others — a misfire code might return within 50 miles; a fuel system code might take a week.
If you clear a code and the light comes back on within a few days, the underlying problem is still present. At that point, you should have a mechanic diagnose it rather than clearing it again, because repeated clearing without repair is a sign that the fix did not work.
Codes that require special steps to clear
Most codes clear with a straightforward scanner command, but some require additional steps. For example, if you replace an oxygen sensor, you may need to clear the code and then drive the car through a specific pattern — highway driving at steady speed, then city driving with stops and starts — for the monitor to complete and confirm the sensor is working.
If you have replaced a part and the code keeps returning even after clearing, check the manufacturer's documentation or ask your mechanic whether that particular code requires a monitor cycle or a special clearing procedure. Some codes also require the battery to be disconnected for a period of time, though this is less common on newer cars.
Disconnecting the battery will clear all codes, but it will also erase other data your car's computer stores, like learned fuel trim values and transmission shift points. Your car may run rough for a few days while it relearns these values. Use battery disconnection only as a last resort if a code will not clear any other way.
Frequently Asked Questions
Will clearing a code damage my car?
No. Clearing a code is a normal maintenance step and does not harm your vehicle. The code itself is just data; erasing it does not affect how the engine runs or any mechanical systems. If the underlying problem still exists, the code will return, but clearing it will not make that problem worse.
Can I drive my car with the check engine light on?
Yes, in most cases. A check engine light means the computer detected a fault, but it does not mean your car is unsafe to drive. The exception is if the light is flashing red or blinking, which indicates a severe misfire or catalytic converter problem — in that case, stop driving and have it towed to a mechanic. A steady light means you can drive, but you should have the code read soon to understand what needs fixing.
Do I need to clear codes after replacing a part?
You should clear the code after you replace the part that caused it, so the computer can re-test the new part and confirm it is working. If you do not clear the code, the light will stay on even though the problem is fixed. After clearing, drive normally for a few days and the light should stay off if the replacement was successful.
What if the same code keeps coming back?
If a code returns repeatedly after you clear it, the underlying problem is still present or the part you replaced was not the real cause. Have a mechanic diagnose the code rather than clearing it again. Repeated clearing without diagnosis wastes time and may mask a more serious problem developing.
Is it illegal to clear codes before selling a car?
Clearing codes is not illegal, but selling a car with a known problem you have hidden is fraud. If you clear a code to hide a fault from a buyer, that is deceptive. If you clear a code because you actually fixed the problem, that is normal maintenance. The distinction is whether the underlying issue is resolved or just hidden.