It happens even to the best guitarists. You're playing a concert, or maybe playing with friends, and a string breaks. You don't have an extra set of strings with you and you are not in a place where you can easily buy them. In some situations, you can fix the broken string so you can keep playing. Although this temporary fix can save you some time (and money), you will still need to replace the broken string as soon as possible. The best (and sometimes only) way to really fix a broken guitar string is to replace it.
Steps
Method 1 of 3: Fix a Broken String

Step 1. Leave the tails long when you string the guitar
To take advantage of this particular trick, you will need a lot of leftover strings on the headstock of the guitar. Instead of cutting them when you finish tensioning the rope, leave the tails on top. This will give you plenty of string to play if it breaks.
Take a coin and wrap it along the string to wrap the tails, similar to how you would wrap a ribbon. That way you won't risk getting pinched by the sharp ends of the rope

Step 2. Pull the pin out of the bridge to free the end of the broken string
When a string breaks, simply pull it off the bridge to free the loose end of the broken string. Be careful to put the bridge pin somewhere where you won't lose it, particularly if you're in a low-light situation.
If there is no clean or safe place to hold the peg and you have no pockets, hold it between your lips, but be careful not to bite it

Step 3. Uncoil the broken string and twist it back through the ball-shaped end
Pull the end of the string a little and thread it through the ball-shaped end. Twist the rope around itself a few times to secure it.
The ball-shaped end part of the rope and the broken end of the rope will have come together. You don't need to twist the rope more than 3-4 times, just enough to make sure they stick together
Tip:
This method can work for almost any break at the bottom of the rope, depending on the length of the tail you left on top.

Step 4. Unwind the string from the headstock
Once you've tied the end, loosen the top of the string so you have some slack to experiment with when you put the broken end back into the peg hole.
It can help to know the length of string that you twisted around the ball-shaped end, so you know how much slack you will need. However, if you have a lot of string on the top of the guitar, you shouldn't have a problem

Step 5. Put the broken end back into the peg hole and pull the string up
Insert the "new" ball-shaped end into the peg hole and snap the bridge peg back into place. Line up the string with the bridge, and feed it back through the headstock.
If the bridge peg doesn't snap into place immediately, place your thumb on it to prevent it from coming off until you feed the string back through the pegbox. It will snap into place when you reattach the string to the correct tension

Step 6. Raise the string to tune it
Slide the string back through the headstock and turn the key until the string returns to the correct tension. If you're in the middle of a song, you may not tune it back to the perfect pitch, but you can get it close enough.
If there is still a long string tail on the guitar headstock, thread the end underneath when you get the chance
Method 2 of 3: Replace the rope

Step 1. Remove the broken string
Carefully remove both ends of the broken string. You may need to pull the pin out of the bridge to free the lower end. Unwind the top end of the string from the headstock. Pulling it hard could damage it.
Roll up pieces of broken string before disposing of them so the sharp ends aren't exposed, which could rip a garbage bag or puncture someone

Step 2. Insert the ball-shaped end of the string into the peg hole and replace the peg
Take the ball-shaped end of the new string and slide it into the peg hole to a depth of about 1 inch (2.5 cm). Then drop the bridge peg back into the hole and press it down with your thumb until it snaps into place.
Pull a little on the string to make sure the bridge peg is secure

Step 3. Pull the end of the new string through the headstock
Uncoil the string and feed it through the slot in the bridge and bring it up through the fingerboard. Insert the end into the pegbox and pull about 2.5 inches (5.1 cm) of the string through the pegbox.
You'll need to pull the string about 5 inches (13 cm) away from the guitar before winding it up

Step 4. Bend the string 90 degrees and turn the tuning peg
Bend the part of the string that you pulled from the pegbox away from the rest of the string so it doesn't tangle when you wind it. Turn the peg counterclockwise to wind the string.
Watch the string wind over the headstock as you turn the tuning peg. Go slowly so that the rope wraps up tightly and doesn't cross. An overlapping winding could cause the string to go out of tune more often
Tip:
you can use one pin winder, which will wind the rope more quickly. However, be careful not to wind the rope too tight and end up breaking it.

Step 5. Tune the string back to the correct tension
Once you've wound the string to the point where it produces a clean sound when played with the pick, stop winding it and use an electronic tuner or other method to get the string to produce the correct pitch.
After changing one string, you will likely need to tune the others as well. They may have lost tension after you've removed the broken string

Step 6. Stretch the string and tune it again
Carefully pull the string away from the guitar, running your fingers along the length of the string, and then back up. Stretching the string will help the string stay in tune.
After you stretch the string, you will need to tune it. You may have to go through the process again

Step 7. Use a coin to wrap the excess string around the head
If you want to leave enough rope on top so that you can temporarily repair it if it breaks, twist off the excess tail of the rope instead of cutting it off. Otherwise, the sharp ends could be dangerous.
If you don't want to leave the ends on, you can trim them with wire cutters
Method 3 of 3: Prevent Strings From Breaking

Step 1. Determine where the strings break most often
Strings tend to break as they wear out due to excessive use or prolonged contact with a sharp edge of the guitar. If the strings break in the same place, inspect the guitar in that area for sharp edges.
You can usually sand a sharp edge on your own, without having to take the guitar to a repair shop. However, if you are not confident in doing this type of repair yourself, it is probably best to let an expert take care of it
Tip:
In some cases, you can use the same old string to smooth out a sharp edge. An old string can be especially effective on a sharp bridge, you just have to rub it back and forth in the groove.

Step 2. Change the strings for alternate tunings
If you've tuned your guitar to an alternate tuning, the strings may be at a higher tension than they are designed to withstand for an extended period of time. If you find that the strings break more frequently when you have alternated tuning, you may need to invest in strings specifically designed for that tuning.
- For example, most string manufacturers make strings specifically designed for Nashville-type tuning.
- The string package will indicate which tunings the strings are suitable for. You can also ask a music store clerk to help you find the best strings for the tuning you want to use.

Step 3. Clean the strings after playing the guitar
When the guitar is played, the oils and dirt from the fingers are transferred to the strings. To clean the strings, simply wipe a clean cloth or an old shirt over the strings every time you finish playing.
Over time, this dirt can corrode the strings, causing them to break. This will be the most likely culprit in the event that the strings break in the area where you play them frequently, and sharp frets are not the problem

Step 4. Play with a lighter pick
A heavier guitar pick puts more force on the strings, causing more wear. If the strings break frequently around the sound opening, or in the area where you normally strum, you may be playing with a pick that is too thick for the strings.
A staff member at your local music store can help you match the guitar pick to the strings. You will want to use something heavy enough to strum effectively and produce the sound you want, but not too heavy to cause excessive wear on the strings

Step 5. Change the strings at least once every 3 weeks
If you play regularly, such as a minimum of 3 times a week for more than an hour at a time, the strings will start to show signs of wear after 3 weeks and may break more often.
Thinner strings tend to wear out more quickly, so you may need to change them more often

Step 6. Stretch the new strings before playing
Every time you change the strings, be sure to stretch them. Pull them gently from the guitar, going up and down, and then tune them again. Stretching helps new strings stay in tune and also prevents them from breaking too easily.