Design your deck railing according to your state's building codes. You should space the spindles no more than nine inches apart. The railing should be about four feet high, but you should allow extra length so that the rail begins flush with bottom outside portion of your deck. Determine how much wood you will need for the project.
Cut your 2 x 2 inch wood to the correct height for the spindles. Drill two holes into each spindle. One hole should be 1 1/2 inches from the bottom of the deck. The second hole should be 1 1/2 inches from the top of the outside of the deck. The holes are markers and should be smaller than the size of your carriage bolts.
Bolt each spindle into place using an electric screwdriver. To provide strength and stability use carriage bolts. The spindle pieces should be flush against the bottom of the deck. You should measure each piece carefully because a mistake will be noticeable.
Cut the 2 x 4s to the correct lengths. Attach to each of the spindle pieces with screws. If you need to, join two 2 x 4 pieces make a joint to help to attach smoothly.
Stain the rail to match your deck.