Do not use 18-8 SS for toerail bolts!
DO NOT buy these at West Marine; they stock only 18-8 type stainless from Asia. Most modern 18-8 stainless is positively terrible. I accidentally/negligently put in 18-8 flat washers under my keelbolt nuts and they went rusty in 4 years. For something as crucial as the toerail (which holds the deck down) I wouldn't touch them.
For this (and really anything nowadays) use only 316 stainless, which allows for less variation in the metallurgic makeup of the material. This is what the original ones were (or should have been, by spec). Typically they are 1/4-20 square-shank carriage bolts about 1-1/2" long. You should be able to find them at Jamestown Distributors or (for more money) through McMaster-Carr. Be sure the locknuts are 316 as well. My boat apparently had bronze flat washers used under the flange, all of which are bright green now, but as they are holding and the 36-year-old toerail doesn't leak, I have left them 'for now'.
Be wary of anything that is not guaranteed to be type-316, such as at Fastenal or from anyone who doesn't make a big deal about the bolts being really 316. The 316 will cost more money per bolt, like 2-1/2 to 3 times as much as 18-8. But they will last more than 3 times as long and being further dissimilar from the 6000-series aluminum they will be less likely to 'weld' themselves to it with corrosion. Just be sure to put anti-seize on them during reassembly.
I'm not sure that anti-seize was ever applied by the factory (most likely it wasn't) but I have found these remarkably easy to remove. I installed U-bolts for the split backstay legs by removing the last toerail bolt and drilling a new hole just before it. With surprisingly little banging by a hammer they popped right out and revealed very little corrosion to the toerail. The U-bolts are 316 SS and under the flat washers (which are 18-8; sorry) I put white electrical tape to insulate them from the aluminum.
In the same way I will be changing my shroud chainplates to U-bolts over the winter as well.