How to Replace Upstream & Downstream Oxygen (O2) Sensors on a 2017-2020 Hyundai Elantra (Engine: Inline 4 2.0L)
Step-by-step instructions with sensor locations, required tools/parts, OBD2 code clearing, and torque specs
How to Replace Upstream & Downstream Oxygen (O2) Sensors on a 2017-2020 Hyundai Elantra (Engine: Inline 4 2.0L)
Step-by-step instructions with sensor locations, required tools/parts, OBD2 code clearing, and torque specs for 2017, 2018, 2019, 2020
🔧 Elantra - Oxygen Sensor Replacement (All Sensors)
On your Elantra, there are two oxygen (O2) sensors: one upstream (before the catalytic converter) and one downstream (after it). Replacing both is straightforward, but the upstream sensor is usually tighter and hotter, and both require careful handling of the wiring to avoid damage.
Difficulty Level: Intermediate | Estimated Time: 1.0-2.0 hours
⚠️ Safety & Precautions
- ⚠️ Let the exhaust fully cool before starting; O2 sensors sit in very hot exhaust parts.
- ⚠️ Support the car with jack stands on a level surface; never rely on a jack alone.
- ⚠️ Keep the sensor wiring away from the exhaust; melted wiring can cause faults.
- ⚠️ If you raise the front end, use wheel chocks at the rear wheels.
- ⚠️ Battery disconnect is not required, but it’s safer if you’re worried about shorting the connector.
🔧 Required Tools
You'll need the following tools for this repair:
- Safety glasses
- Mechanic gloves
- Wheel chocks
- Floor jack (rated 2-ton minimum)
- Jack stands (rated 2-ton minimum)
- 21mm oxygen sensor socket (specialty)
- 3/8" drive ratchet
- 3/8" drive extension set
- 3/8" drive torque wrench (10-100 ft-lbs)
- Trim clip removal tool
- Flat-blade screwdriver
- Needle-nose pliers
- Penetrating oil
- OBD2 scan tool
🔩 Required Parts
HowToo sells all the parts you need for this repair:
- Upstream oxygen sensor (Sensor 1) - Qty: 1
- Downstream oxygen sensor (Sensor 2) - Qty: 1
- Anti-seize compound (sensor-safe) - Qty: 1
- Replacement push clips for under cover - Qty: 4-10
📋 Before You Begin
- Park on level ground, shift to Park, and set the parking brake.
- Let the engine/exhaust cool at least 60 minutes.
- If you have an OBD2 scan tool, read and save any codes first (helps confirm which sensor was failing).
- Lift the front of the car using a floor jack and set it on jack stands at the front pinch welds.
🔨 Step-by-Step Instructions
Follow these steps in order:
Step 1: Confirm sensor locations
- Open the hood and look at the exhaust side of the engine for the upstream sensor (Sensor 1) screwed into the exhaust manifold/front pipe area.
- Slide under the front and find the downstream sensor (Sensor 2) screwed into the pipe after the catalytic converter.
- Sensor 1 is closer to the engine.
Step 2: Remove the lower engine under cover (if equipped)
- Use a trim clip removal tool and flat-blade screwdriver to remove the plastic clips and screws holding the under cover.
- Set clips aside; replace any that break.
Step 3: Unplug the downstream O2 sensor connector
- Locate the downstream sensor wiring and follow it to the connector clipped to the body/brace.
- Release any harness clips using needle-nose pliers or a trim clip removal tool.
- Press the connector lock tab and unplug it by hand (use a flat-blade screwdriver gently if stuck).
Step 4: Remove the downstream O2 sensor
- Spray the sensor threads at the exhaust bung with penetrating oil and wait 5-10 minutes.
- Install the 21mm oxygen sensor socket (specialty) over the sensor wire and onto the sensor hex.
- Use a 3/8" drive ratchet and 3/8" drive extension set to break it loose, then unthread it by hand.
Step 5: Install the new downstream O2 sensor
- Compare the new sensor to the old one (same connector and wire length).
- If the new sensor threads are not pre-coated, apply a tiny amount of anti-seize compound (sensor-safe) to the threads only; keep it off the tip.
- Thread the sensor in by hand first to avoid cross-threading.
- Tighten using the 21mm oxygen sensor socket (specialty) and a 3/8" drive torque wrench (10-100 ft-lbs): Torque to 44 Nm (32 ft-lbs).
- Route the wiring the same way as factory and re-clip it so it cannot touch the exhaust.
- Reconnect the connector until it clicks.
Step 6: Unplug the upstream O2 sensor connector
- From the top of the engine bay, locate the upstream sensor connector on the harness near the exhaust side.
- Release harness clips using the trim clip removal tool.
- Press the lock tab and unplug the connector by hand.
Step 7: Remove the upstream O2 sensor
- Spray the sensor threads with penetrating oil and wait 5-10 minutes.
- Fit the 21mm oxygen sensor socket (specialty) onto the sensor.
- Use a 3/8" drive ratchet with a 3/8" drive extension set to loosen it, then unthread by hand.
- If it feels stuck, add oil and wait longer.
Step 8: Install the new upstream O2 sensor
- If needed, apply a small amount of anti-seize compound (sensor-safe) to threads only.
- Start threading by hand until fully seated.
- Tighten using the 21mm oxygen sensor socket (specialty) and 3/8" drive torque wrench (10-100 ft-lbs): Torque to 44 Nm (32 ft-lbs).
- Reconnect the electrical connector until it clicks, and re-secure all harness clips.
Step 9: Reinstall under cover and lower the car
- Reinstall the under cover using the trim clip removal tool and flat-blade screwdriver.
- Raise slightly with the floor jack (rated 2-ton minimum), remove jack stands (rated 2-ton minimum), and lower the car.
✅ After Repair
- Use an OBD2 scan tool to clear any stored O2-related trouble codes.
- Start the engine and listen for exhaust leaks (ticking sound) near the sensor areas.
- Test drive 10-15 minutes, then re-scan for pending codes.
- If you still get heater-circuit codes, re-check each connector is fully seated and wiring isn’t pinched.
💰 DIY vs Shop Cost
Shop Cost: $300-$700 (parts + labor)
DIY Cost: $120-$350 (parts only)
You Save: $180-$350 by doing it yourself!
Shop labor rates vary but typically run $100-$150/hour. This repair takes a shop approximately 1.0-2.0 hours.
🎯 Ready to get started?
HowToo makes it easy: same-day/2-day shipping on every part, plus all the tools and specialty tools you need! Check out the parts and tools sections below to add everything to your cart.
Guide for Oxygen Sensor replace for these Hyundai vehicles
| Year Make Model | Sub Model | Engine | Body Style |
|---|---|---|---|
| 2020 Hyundai Elantra | - | Inline 4 2.0L | - |
| 2019 Hyundai Elantra | - | Inline 4 2.0L | - |
| 2018 Hyundai Elantra | - | Inline 4 2.0L | - |
| 2017 Hyundai Elantra | - | Inline 4 2.0L | - |




















