When your bicycle pedals wear out or become loose, it is time to replace them. Fortunately, you can easily replace the pedals at home with a few tools. When replacing your bike pedals, take the time to fit the new pedals correctly so you don't have a hard time removing them in the future.
Steps
Part 1 of 2: Remove Old Pedals

Step 1. Secure the bike on a flat surface
If the bike has a kickstand, support it on it. If it doesn't, lean it over a wall or table so it stays upright.
You can also turn the bike upside down, so that it rests on the seat and the handlebars

Step 2. Check the pedals to see what kind of key you will need
Look at the gap between the pedal and the crank arm (the metal arm that the pedals are attached to). If you see flat spots that a wrench can grip you will need a wrench. If you don't see flats for a wrench, look for a hex socket for an Allen wrench on the end of the shaft that connects the pedal to the crank arm. If you see the socket, you will need an Allen key.
- If you need to use a wrench, a 15mm (0.59 inch) wrench will normally work on an adult bike. Some children's bikes will need a 14mm (9/16 inch) wrench. Some faucets have openings with both standard sizes.
- A 6mm (0.24 inch) Allen wrench will normally work on bikes with sockets.
- Some bicycle pedals are designed so that you can use both a wrench and an Allen key. If you see flats on your bike pedal, keep looking at the end of the axle to see if there are any Allen key sockets there.

Step 3. Place the key on the right pedal
If you are using a wrench, place the jaws around the flats between the pedal and the crank. If you are using an Allen wrench, insert the hex end of the wrench into the hex socket at the end of the pedal shaft.
Make sure to start with the right pedal. The direction of rotation required to loosen the right pedal is different from that of the left

Step 4. Turn the key counterclockwise to loosen the right pedal
If you are using a wrench, make a half turn and separate the wrench from the flats. Hold the opposite pedal when doing this for better leverage. Reposition the key on the flats with the handle facing up so that you can do another half turn. Continue turning the key to the left until the pedal is completely slack.
If you are using an Allen key, the socket is probably inside the pedal. Which means that you will have to turn the key clockwise (while the shaft turns in the opposite direction, seen from the outside)

Step 5. Remove the right pedal and set it aside
The pedal should slide off the crank once you've loosened it. If the pedal is still in good condition, save it in case you need it in the future.

Step 6. Repeat with the left pedal, but turning the key clockwise
The nut on the left pedal is opposite the nut on the right pedal. This prevents the left pedal from unscrewing when you ride the bike. Use the wrench or Allen key to unscrew the pedal until it is completely loose. Then, pull it out and leave it together with the right one.
If you use an Allen key in a socket positioned inside the pedal spindle, you will have to turn it counterclockwise
Part 2 of 2: Install the New Pedals

Step 1. Apply waterproof grease to the bicycle nuts and the holes in the pedals
The grease will prevent the pedals from binding and having a hard time removing them. Use enough grease to cover the thin nuts.
You can find waterproof grease online or at a bike store

Step 2. Insert the threaded end of the new pedal into the right pedal hole
The right pedal should have a little "R" on it to indicate that it is the right one. Do not press the pedal against the hole or you could damage the nuts. Only the end of the new pedal should rest in the pedal hole.
Before you start using the wrench, make a few turns by hand to ensure that the nuts on the new pedal are lined up correctly

Step 3. Place the key on the right pedal
If you are using a wrench, place the jaws around the flats of the new pedal. If you are using an Allen key, insert the hex end through the hole and into the Allen key socket at the end of the pedal shaft.

Step 4. Turn the key clockwise to lock the pedal in place
Continue turning the key in that direction until the pedal is fully adjusted. If you are using a wrench, make a half turn and lift it up and back onto the top of the pedal before making another half turn.

Step 5. Repeat with the left pedal, but turning the key counterclockwise
Turn the key to the left until the pedal is locked.

Step 6. Check the pedals to make sure they are positioned correctly
Gently pull on the pedals to see that they feel secure. If you feel any movement (slack) in the bracket, then the pedals need to be tightened. Twist the pedals on their holders and make sure they turn smoothly.
- Newly installed pedals do not normally rotate freely, as the brackets need time to settle.
- You can also check the alignment on the axle by turning the pedal crank back and carefully observing the pedals. They must be in the same plane, perpendicular to the crank circle, throughout the rotation.