How to clear the codes of a check engine light comes down to one tool: an OBD2 scanner. Plug it into the port under your dash, read the codes, fix the problem, then pick the erase option. The light goes out in seconds, but it comes right back if the fault is still there.
That is why the order matters. Clearing a code before you know the cause throws away useful clues, and it also resets your emissions readiness. This guide covers three ways to clear the light, what each one does and how to avoid a repeat warning.
Key Takeaways
- An OBD2 scanner is the most reliable way to clear codes on any 1996 or newer car.
- Read and write down the code first, then fix the cause before you erase it.
- You can clear a check engine light without a scanner by disconnecting the battery, but it may only wipe other settings.
- Clearing codes resets the readiness monitors, so plan on 50 to 100 miles of driving before an emissions test.
- If the light flashes or keeps returning, stop clearing it and get the car diagnosed.
In this guide:
- Read the code before you clear it
- Clear the codes with an OBD2 scanner
- Clear the light without a scanner
- Which method should you use?
- What to fix before you clear the codes
- Emissions readiness after clearing
- Why the light comes back
- FAQ
Read the Code Before You Clear It
A check engine light means the engine computer logged a fault. When a system drifts out of its normal range, a sensor sends a signal and the light turns on. TrueCar lists a loose gas cap, worn spark plugs, failing oxygen sensors and internal engine trouble among the usual triggers.
Cars built in 1996 or later report faults through the OBD II system. A scanner shows each code in a format like P1234. Write it down before you do anything else.
You do not need to own a scanner to get the code. Many auto parts stores will read it for free. Older cars work differently, because a pre-1996 car flashes its codes through the warning light, and the number of flashes matches a fault code.
How to Clear the Codes of a Check Engine Light With an OBD2 Scanner
A scanner is the quickest and cleanest method. The Drive says the job should take no more than 30 minutes, even the first time.
- Find the port. It usually sits under the dash near the pedals, and some cars put it in the passenger footwell. The socket is trapezoid-shaped, and a plastic cover may hide it.
- Connect the scanner. Plug it in, start the car and wait a few seconds for the code to appear.
- Record every code. Write down each one before you erase anything.
- Fix the cause. Repair the part, or confirm that it works.
- Erase the codes. Choose the erase or clear option in the scanner menu.
- Restart and test. Start the car again and check that the light is off, then drive normally.

If the light does not come back after a short wait, the repair probably worked. If it does return, the fault is still active, and you may need to check the repair again.
Pro Tip: A Bluetooth code reader stays plugged into the port and pairs with your phone. It costs more than a basic corded reader, but it is easier to carry.
How to Clear a Check Engine Light Without a Scanner
You have two options if you do not have a scanner. Both are less reliable, and neither one tells you what went wrong.
Method 1: Disconnect the battery
This is the method most people know. It cuts power to the computer, which can erase pending and current codes on many cars.
- Turn off the car and remove the key.
- Loosen the negative cable first, then the positive cable.
- Wait. The Drive suggests 15 to 30 seconds. Another repair site recommends at least two minutes.
- Reconnect the positive cable first, then the negative cable.
- Start the car and check the light.
Warning: Car batteries hold electrical charge and acid. Keep your wrench from touching two terminals at once, because it can spark. Wear gloves and eye protection.

This method has real downsides. It can wipe radio presets and the clock. On many newer cars, the computer keeps codes in memory that survives a power cut, so nothing clears. Rick’s Free Auto Repair Advice also notes that a battery reset never erases permanent codes, and it suggests a throttle body relearn afterward. Check your shop manual for the steps on your engine.
For a Toyota owner, the RAV4 battery replacement guide shows where the terminals sit on that model.
Method 2: Fix the problem and let the drive cycle clear it
If you repair the fault and leave the code in memory, the car can clear the light by itself. Each time you start and warm up the engine, the computer runs self-tests. When the repair worked and the tests pass, it turns the light off on its own.
A drive cycle typically includes a cold start, some idling, steady driving at different speeds and several slowdowns. You do not have to plan it. Normal commuting does the job over several days.
This approach only makes sense after a real repair. If the fault is still present, the light stays on or returns.
Which Method Should You Use?
Here is how the three methods compare at a glance.
| Method | Tools needed | Reliability | Watch out for |
|---|---|---|---|
| OBD2 scanner | Scanner or free store reader | Most reliable | Resets readiness monitors |
| Battery disconnect | Wrench, gloves | Hit or miss | Wipes presets, may not clear newer cars, permanent codes stay |
| Repair and drive | None | Works after a real fix | Slow, and the light stays on until the tests pass |
Use the scanner whenever you can. It reads the cause, clears the code and lets you confirm the fix in one visit.
What to Fix Before You Clear the Codes
Clearing a code is not a repair. The fault has to be gone first, or the computer logs it again. These are the usual suspects.
| Common cause | What to check | Difficulty |
|---|---|---|
| Loose or cracked gas cap | Tighten it fully, or replace a worn cap | Easy |
| Battery cable problem | Look for a loose or corroded connection | Easy |
| Faulty spark plugs | Check plug wear and ignition parts | Moderate |
| Oxygen sensor | Test the sensor and replace it if it fails | Moderate |
| Internal engine problem | Get a professional diagnosis | Shop job |

Start with the cheapest fix. A loose cap costs nothing to check. Toyota RAV4 owners can read how to open the gas cap on a RAV4. If the code points to an exhaust sensor, this guide to the RAV4 oxygen sensor change walks through the job.
What Clearing Codes Does to Emissions Readiness
Every car runs self-tests on its emissions systems. Each system that passes gets a Ready status. When you clear the codes, every monitor goes back to Not Ready. Rick’s Free Auto Repair Advice points out that a testing station can see this instantly, and it counts as a fail.
The fix is time and miles. TrueCar recommends driving 30 to 100 miles after a reset, and says 50 to 100 miles usually gets the monitors ready for an emissions test. Check with your dealer or mechanic for your exact vehicle.

Permanent codes work differently. They point to a serious emissions problem, and neither a scanner nor a battery reset removes them. The only way out is to fix the problem and drive until the car passes its readiness tests.
Note: Do not clear codes right before an inspection. The monitors need miles to finish, and clearing them early can cost you a retest.
Why the Check Engine Light Comes Back
A returning light is a message, not a glitch. Here are the most common reasons.
- The fault is still there. A hard fault trips the light again, often within one drive.
- The repair was incomplete. One bad sensor can hide a second problem.
- A new fault appeared. The new code may differ from the first one.
- A permanent code is stored. Only a real fix and a passed test removes it.
A steady light means you should have the car checked soon. A flashing light is more urgent, because it often means an active misfire that can damage the catalytic converter. Pull over safely and arrange a tow or a shop visit.
Toyota owners can compare their model with how to reset the check engine light on a RAV4 and what to do first when a Supra light comes on.
Frequently Asked Questions
Can I clear check engine light codes without a scanner?
Yes, but it is less reliable. You can disconnect the battery for a short time, or fix the cause and keep driving until the car clears the code itself. A battery reset may only wipe radio settings on newer cars, so a scanner is the surest method.
Does disconnecting the battery clear the codes?
Sometimes. It can erase pending and current codes on many cars, but it will not erase permanent codes, and it also resets settings like radio presets. On newer models it may not clear anything at all, so a scanner gives a more dependable result.
How long does the check engine light take to go off?
With a scanner, the light goes off right away, though it returns if the fault remains. If you let the car clear the code itself, expect several drive cycles after the repair. Plan on 30 to 100 miles of driving to confirm the fix.
Will clearing the codes help me pass an emissions test?
No. Clearing codes resets the readiness monitors to a not ready state, and a testing station can see that right away. Drive about 50 to 100 miles after the repair so the monitors can finish, then confirm the timing with your mechanic or dealer.
Is it safe to drive with the check engine light on?
A steady light usually means you should get the car checked soon. A flashing light often signals a misfire that can damage the catalytic converter, so pull over and call for help. When in doubt, have a mechanic read the code before you drive far.
Where is the OBD2 port?
On most cars it sits under the dashboard near the pedals, and some cars place it in the passenger footwell. It has a trapezoid shape that matches your scanner plug. A plastic cover may hide it, so check your owner’s manual if you cannot find it.
Final Thoughts
Now you know how to clear the codes of a check engine light: read the code, fix the cause, then erase it with an OBD2 scanner. The battery method and the drive cycle method work in a pinch, but they are less reliable and tell you nothing about the fault.
If the light returns or flashes, stop clearing it and get a proper diagnosis. Your next step is simple. Borrow or buy a scanner, write down the code and start with the cheapest fix.
