If the replacement chain for your bike is too long, you will first need to adjust it to ride safely. Chains also “stretch” over time, but don't shorten the chain to fix the problem. Stretch is a sign of wear and once the chain exceeds the maximum recommended on a chain stretch gauge, it should be totally replaced.
Steps
Part 1 of 3: Remove the chain

Step 1. Decide if the chain needs to be replaced
Count 12 links and measure them from the first pin to the last. The distance between these pins should be 12 inches (30 cm). If the distance is more than 12 1/8 inches (30 cm), then you will need to replace the chain. This is because the pins wear out, lengthening the chain.
If the distance between the 12 links is correct and you have an older bike, consider loosening the rear tire and pulling it back. This may tighten the slack part of the chain enough to fix the problem

Step 2. Buy a universal chain punch if you don't have one
This tool pushes the pins out of the chain to allow removal of the link. If you know the make and model of your bike's chain, you may want to find a specialized tool for the specific chain.
Some chains, especially most high-quality Shimano and Campagnolo models, also require a special reassembly pin. You can't reassemble the chain without this pin, so make sure you have the right part before you start

Step 3. Mount the bike on a bike stand
If you don't have an easel, prop it up against something sturdy, preferably upside down. This will make it easier to remove the chain.

Step 4. Clean the chain if it is dirty
Use a high-quality biodegradable chain cleaner or rubbing alcohol to dissolve any dirt or grease. This will make it easier to handle the chain and find the lock link.

Step 5. Locate the closing link
Your chain may or may not have a locking link. The closing link is easy to spot as it is generally a little lighter or darker than the other links in the chain. It may also have prominent pins driven into a special outer plate. Typically this board has a large oval hole around one or both of the pins.
Step 6. Turn the pedals until the locking link is between the front and rear gears
This will facilitate access. If your chain does not have a locking link, you will need to use a chain breaker to break the chain.

Step 7. Open the closure link, slide it and place it somewhere where it will not get lost
There are many lock link designs. Some rotate to allow the pin to pop out, while others open when flexed. Some locking links are also disposable and can only be removed by bending them with needle nose pliers or a specialized tool.
Check the side of the chain to find information about the make and model. Visit the manufacturer's website to find model-specific information about the locking link
Part 2 of 3: Shorten the chain

Step 1. Decide how many links you need to remove
It is better to remove too few links at the beginning than to remove too many. It will be easier to remove one or two extra links than to replace several.

Step 2. Hold the next link in the chain
It starts at the end of the chain that is not attached to the closing link. Hold that link in place with a vise, or by using the clamping mechanism on the chain punch if you have one.
If the chain does not use a closing link, start with any link in the chain

Step 3. Push most of the pin out
Align the punch of the chain cutter over the link pin. Slowly turn the chain cutter handle clockwise and stop when the pin is evident on the outer plate but is still attached to the link. Don't push the pin all the way out of the link!
- In many cases, you won't be able to replace the pin if you push it all the way out of the link. However, some manufacturers (including brands such as Shimano and Campagnolo) make replacement pins, but not all are compatible with all chains.
- If you accidentally pushed the entire pin out, you may be able to slide it through the center of the link. Use the chain punch to remove the top of the tie link, then slide the pin back through the link until the top of the pin lines up with the center of the link. Replace the top of the link, then use the chain cutter to push the pin up. Adjust the neighboring pin as needed.

Step 4. Repeat for the second pin and remove the link
Continue on the other pin on the same link. Push it out far enough so that you can lift one of the outer plates, followed by the center piece that attaches it to the next link.

Step 5. Remove the extra links to shorten the chain
Only remove the minimum number of links to make the chain work, generally less than 5. The more you shorten the chain, the more stress you will put on the links.
- As before, leave the pins partially attached and put all the pieces aside.
- Consider saving the chain links you are removing for future repairs.
Part 3 of 3: Reassemble the chain

Step 1. Attach the locking link to both ends of the chain
You may need to use a pliers or screwdriver to do this. Push both links in until you feel the pins snap into place on the inner link.
If your chain has a disposable locking link or a special pin, you will need a replacement part to reattach the chain. Most of these specialty pins come in two pieces that slide into opposite sides, but it's best to look up the specific instructions for each model

Step 2. Reconnect the chains using a chain cutter
Place two links in the outer slot of the chain cutter. Make sure the pins are facing towards the pin on the chain cutter. Turn the handle to the right. As you turn, the chain cutter pin will begin to push the pins back through the link. Continue until you can see a small part of the link from the other side. The chain pin should stick out the same amount on both sides of the link.
If you have a link that can be removed quickly, you may need a pair of pliers to replace it
Step 3. If necessary, relocate the pin
Sometimes you will have to check the chain from side to side to relocate the pin. To do this, take a firm grip on both sides of the stiff link and carefully check the chain perpendicular to its direction of rotation until the link loosens.

Step 4. Apply a high-quality lubricant to the chain
This will increase the life and flexibility of the chain. It will also improve shift performance and reduce wear on the derailleur mounts and drive gears.
Advice
- Some people recommend using a hammer to remove the pin. This is not a good idea as you are more likely to push the pin all the way out.
- Lubricating the chain will increase its life.
- If you need help, don't hesitate to go to a bike shop for advice. They won't charge you for that, and they may even recommend various community bike groups.
- If you ride your bike periodically, check the chain every few months. The longer you let it wear out, the more damage it will do.
- If the chain is too tight, move the derailleur forward. This will loosen the chain.
Warnings
- Don't push the pin all the way out.
- If you don't have the right replacement part, don't rely on makeshift solutions like forcing the pins by hand. You may be able to get home if the chain breaks along the way, but it is unstable and dangerous in the long run.