Sew a Button on by Machine
Here's how I sew on a flat 2- or 4-hole button by machine.
If you are replacing a button, make sure that all threads from the previous button have been removed. If the fabric has been significantly weakened, fuse another layer of fabric to the wrong side of the area, or fuse on a twill or denim patch. If you expect additional stress, secure the edge of the patch with a zigzag stitch if it will not show or matter.
Tape the button into position, then tape a toothpick on top of the button, making sure that the toothpick does not cover the button's holes. A straight pin can be substituted for the toothpick.
Lower the presser foot onto the button so that the toothpick runs front to back at the center of the foot and the back two holes both appear under the wide opening of the foot
You may find with your machine that it's easier to do this with the presser foot off. This is true for my machine, but I found it easier to leave the presser foot on when using my Mom's machine.
Set the machine's stitch length to zero. Set the machine to zigzag stitch, and play with the stitch width and button positioning until you think the needle will go into both holes just right. Stitch one pair of holes and then the other pair of holes, using 5-6 stitches for each pair. In the first picture, you can see that I am holding the thread tail before starting to sew; this keeps the thread from creating a "bird's nest" on the underside of the stitching. You can see a fuzzy image of two sets of stitches formed over the toothpick in the second picture.
For a row of buttons, do them all in a row, leaving thread running from one button to the next. After all the buttons are stitched, pull buttons and fabric away from the machine, and cut both threads between the garment and the presser foot area. Clip the connecting threads midway between each button. Pull as many threads as you can to the back. Cut all remaining threads near the buttons on the front. Tie off the threads at the back, and clip about 1/4-inch from fabric.
On the wrong side of the garment, place a dot of seam sealant such as Fray Check on the threads and let dry.
Snap the toothpick in half. You may need to place a thumb over the center of the button to break the toothpick. Pull both pieces of toothpick out. Remove the tape, which will tear off into strips.