For cedar fencing, use stainless steel screws (A2/304 or, in coastal or high-moisture settings, A4/316) or hot-dip galvanized screws, and avoid plain carbon steel, electro-galvanized, or coated screws marketed as "deck screws" unless their coating is explicitly rated for cedar and exterior use; the key issue is that cedar is acidic and moisture-retaining, which corrodes ordinary fasteners and produces rust stains and eventual joint failure.
Why Cedar Is Hard on Fasteners
Western red cedar (Thuja plicata)—the species most commonly sold as cedar fencing in the United States—contains water-soluble extractives, notably thujaplicins and other tropolone compounds, that give the wood its decay resistance and characteristic odor. These extractives are acidic. When the wood is wet—and fencing is wet much of the time—those acids sit in contact with the fastener. Cedar is also relatively porous and holds moisture against the screw shank and threads, so a fastener in cedar experiences longer wet contact than one in, say, a painted pine trim board that dries quickly.
The practical consequences are twofold. First, corrosion: zinc coatings and thin electroplated layers are consumed faster in acidic, persistently damp wood than in dry interior lumber. Second, staining: as iron or zinc corrodes, corrosion products migrate into the wood and leave dark or rust-colored streaks that are difficult or impossible to remove without sanding or replacing boards. On an unpainted, naturally weathered cedar fence, staining is the failure most homeowners notice first.
This is the reason the usual advice is not "use any exterior screw," but "match the fastener's corrosion resistance to cedar's chemistry."
The Realistic Hierarchy of Choices
Stainless steel A2/304 is the standard recommendation for cedar in most of the continental United States. It resists the acids in cedar well, does not produce rust stains, and is strong enough for fence framing and board attachment. It costs noticeably more than coated steel, but a fence has hundreds of fasteners, and the labor of replacing rusted or snapped screws (and stained boards) usually exceeds the premium.
Stainless steel A4/316 adds molybdenum, which improves resistance to chlorides. It is the right call within a few miles of saltwater, in coastal fog belts, and anywhere the fence will be exposed to deicing salt spray. Inland, A2 is ordinarily sufficient; choosing A4 everywhere is not wrong, just more expensive than the exposure requires.
Hot-dip galvanized screws conforming to ASTM A153 (the hardware galvanizing standard) are the budget-conscious acceptable option. The zinc layer is thick and metallurgically bonded, so it sacrifices slowly and protects the steel beneath. They will generally outlast electro-galvanized or "zinc-plated" screws by a wide margin. In dry, inland climates they can be a reasonable value. In wet or coastal climates, or where the fence will be stained with an acidic or copper-containing finish, their service life shortens, and some zinc staining is possible over time.
Electro-galvanized, zinc-plated, or "ceramic-coated" deck screws are the category to treat with suspicion. The coating is thin—often measured in microns—and is designed for treated lumber in dry service, not for acidic cedar in constant weather. Many are also labeled for "ACQ treated lumber," which is a different corrosion problem (copper-based preservatives) and does not imply cedar suitability. These are the screws that produce the red-brown streaks and the snapped heads at the fence rail five years later.
Plain steel, black drywall screws, and interior screws are simply wrong for this application. They will corrode quickly in cedar, and they are not rated for exterior structural loads.
What "Which Screws" Actually Covers
The question is ambiguous in a way that matters, because a cedar fence uses fasteners for at least four distinct jobs, and the right answer is not identical for each.
Board-to-rail attachment is the most visible and most stain-sensitive joint. Here stainless is strongly preferred, especially for horizontal boards, board-on-board designs, and any fence with exposed fastener heads. A typical choice is a #8 or #9 diameter screw long enough to penetrate the rail by roughly 1 inch (about 25 mm) without poking through the far side—commonly 1-5/8 to 2 inches for nominal 1-inch-thick pickets into nominal 2-inch rails. Trim-head or wafer-head screws with a small head and a self-countersinking nib are popular because they sit flush without crushing soft cedar fibers.
Rail-to-post and frame connections carry structural load and benefit from larger diameters—commonly #9 to #12—and lengths set by the thickness of rail plus required embedment into the post. Stainless structural screws exist; hot-dip galvanized structural screws are also available. Do not substitute a short decorative screw here.
Post bases, hinges, latches, and gate hardware are a separate corrosion environment. Stainless is the safe default; mixing metals (for example, a galvanized bracket with a stainless bolt) can cause galvanic corrosion of the less noble metal, so keep the fastener and hardware families consistent where they touch.
Hidden or concealed fasteners—clips, brackets, and splines used for board-on-board or horizontal fencing—must be evaluated on their own coating, not on the visible screw. Some are stainless; some are galvanized steel; some are plastic. Their corrosion performance drives the fence's hidden failure modes.
So "which screws for cedar fencing" has a single governing principle (corrosion resistance matched to cedar's acidity and the local moisture/salt exposure) but multiple correct specific answers depending on which joint you mean.
Length, Diameter, and Drive Type
Length rule of thumb. For attaching a board to a rail, the screw should bury roughly 1 to 1.5 inches into the rail. For a nominal 1-inch picket into a nominal 2-inch (actual 1.5-inch) rail, a 2-inch screw gives about 1 inch of picket plus about 1 inch of embedment into the rail—adequate. Going longer risks penetrating the back face of the rail, which creates a rust-and-snag point and, on a visible rail, an ugly exit wound.
Diameter. #8 and #9 are typical for pickets; #9 to #12 for rails and posts. Cedar is soft, so a screw that is too thin can pull through under wind load or gate slam; a screw that is too thick can split a rail near its end. Pre-drilling near board ends and in thin rails is prudent, especially with larger diameters and with kiln-dried cedar that has hardened.
Drive type. Torx/star drives (often T20 or T25) are now common on quality exterior screws because they resist cam-out in soft wood and allow higher torque without stripping. Phillips is more familiar but strips more easily. Square drive (Robertson) is common in some regions and on some brands. None of these is a corrosion issue; choose based on the bits you can reliably supply.
Head style. Trim-head or wafer-head screws with a small diameter and a self-countersinking nib are the standard choice for visible cedar because they sit flush without a visible washer and without crushing the soft fibers. Bugle-head deck screws are fine for structural joints but look heavier on a finished face.
The Treated-Lumber Confusion
A frequent source of bad advice is conflating "cedar" with "pressure-treated." They present opposite fastener problems in some respects. ACQ and copper-azole treated lumber contain copper, which aggressively corrodes galvanized and electro-galvanized steel; the standard guidance there is stainless or heavily coated (often "double-barrier" or hot-dip galvanized) fasteners. Cedar, by contrast, attacks fasteners through acidity and moisture rather than copper. A screw marketed as "for treated lumber" is not automatically suitable for cedar; check whether the manufacturer lists cedar or "all exterior wood" and whether the coating is hot-dip galvanized or stainless. Many "deck screws" sold for treated pine are electro-galvanized and will stain cedar.
Similarly, "exterior" is not a corrosion rating. A screw can be labeled exterior because it is coated enough for a dry climate or a painted surface, yet still corrode in bare cedar.
Finishes, Stains, and Chemical Interactions
If the fence will be stained, the finish itself can change the corrosion picture. Some stains and wood preservatives are acidic or contain copper; these can accelerate corrosion of galvanized fasteners and, in extreme cases, even affect lower-grade stainless. The general safe approach is to choose stainless when the finish chemistry is unknown or aggressive, and to follow the finish manufacturer's fastener guidance. A related practical point: apply finish after the fence is assembled and the wood has had a chance to dry, and avoid trapping moisture behind fresh stain against new fasteners.
Freshly cut or green cedar releases more moisture and extractives at the joint than seasoned wood, so fasteners installed in green lumber see a harsher initial environment. This is a reason to prefer stainless for fences built from green stock, which is common for cedar fencing sold rough-sawn or "green" for natural weathering.
Climate and Exposure
The exposure map is simple:
Inland, moderate humidity, no salt: A2/304 stainless is ideal; hot-dip galvanized is a defensible budget choice. Coastal, salt spray, fog belt: A4/316 stainless is the safe default; hot-dip galvanized will have a shortened and variable life. Desert or very dry climates: hot-dip galvanized holds up well; stainless is still the lowest-maintenance choice. Pool enclosures, deicing-salt zones, or near the ocean: A4/316 and consistent stainless hardware.
These are general tendencies, not guarantees; local microclimates (shaded north-facing fences that stay damp, sprinkler overspray, irrigation runoff) can make a "dry" climate behave like a wet one at the fence line.
What Cannot Be Answered Without More Information
Several specifics genuinely depend on facts not given in the query:
The exact cedar species and grade (Western red cedar vs. incense cedar vs. Eastern red cedar—Juniperus virginiana, a different wood with different extractives) affect corrosion severity somewhat, but the governing advice (stainless or hot-dip galvanized) does not change. The fence design (board-on-board, horizontal, shadowbox, privacy) determines which joints exist and how many fasteners are structural. The local climate and proximity to saltwater determine whether A2 is enough or A4 is warranted. The finish schedule (bare, oiled, stained, painted) affects chemical exposure. The hardware already chosen (post bases, brackets, hinges) affects galvanic compatibility. The building code or HOA requirements in a specific jurisdiction may impose fastener specifications for wind or seismic loading; those must be checked locally.
What is answerable without those details is the governing rule: use stainless steel, or hot-dip galvanized as a minimum, and avoid plain or thin-coated steel in cedar.
Common Misconceptions, Briefly
"Cedar is naturally rot-resistant, so any screw is fine." Decay resistance and fastener corrosion are different properties. Cedar resists fungi and insects; it does not protect steel.
"Galvanized is galvanized." Electro-galvanized (thin, often 5–12 µm) and hot-dip galvanized (ASTM A153, much thicker) behave very differently in wet acidic wood. The label matters.
"Stainless is overkill for a fence." It is the lowest-maintenance choice and the one least likely to stain bare cedar. The premium is real, but so is the cost of re-screwing and sanding stains.
"Deck screws are for decks, and a fence is a deck." Deck screws are often optimized for treated lumber and painted or composite surfaces in dry service. Check the specific product's wood-species and exposure guidance rather than the category name.
"Bigger is always stronger." In soft cedar, an oversized screw can split rails and posts, especially near ends. Match diameter to the member and pre-drill where needed.
Putting It Together
For a typical Western red cedar privacy fence built inland from kiln-dried or green stock, the practical specification is: A2/304 stainless trim-head screws, #8–#9 for pickets, #9–#12 for rails, length set so the screw penetrates the receiving member by about 1 inch without exiting, Torx drive, pre-drilled near ends. In coastal or salt-exposed settings, upgrade to A4/316. If budget forces a non-stainless choice, use hot-dip galvanized to ASTM A153, accept a shorter service life and some risk of zinc staining, and avoid electro-galvanized or generic "exterior" coated screws. Keep gate and post hardware in the same metal family to avoid galvanic couples, and confirm any local code or HOA fastener requirements before building.
The single sentence that captures the answer: for cedar fencing, the screw that matters is one whose corrosion resistance is matched to cedar's acidity and to the local moisture and salt exposure—stainless first, hot-dip galvanized as the floor, and never plain or thin-coated steel.