Yes if it comes from untreated wood, and only as a modest fraction of the pile. Sawdust is one of the most carbon-heavy materials there is, around 400:1, so a lot of it will stall a pile completely. Below: whether you can compost sawdust, why, how much to add, and the mistakes that cause trouble.
Sawdust is almost pure cellulose and lignin with virtually no nitrogen. Microbes trying to break it down pull nitrogen from their surroundings, which is why fresh sawdust dug into soil causes visible nitrogen deficiency in plants.
Its fineness cuts both ways: high surface area helps, but it packs into a dense, water-shedding layer.
Thin layers mixed through plenty of nitrogen-rich greens. Think of it as a seasoning, not an ingredient.
Wood shavings are more forgiving than fine dust because they keep the pile open.
Composting sawdust from treated, painted or engineered wood. MDF, chipboard and plywood contain adhesives and preservatives that do not belong in soil.
Adding a large volume at once, which locks the pile up for a year or more.
Untreated softwood and hardwood: fine, in moderation. Softwood breaks down slightly faster.
Pressure-treated lumber: never. Modern treatments use copper compounds; older stock may contain chromated copper arsenate.
MDF, chipboard, plywood, OSB: no. These are wood plus adhesive, typically urea- or phenol-formaldehyde.
Painted, stained or varnished wood: no.
Walnut: contains juglone, which inhibits tomatoes, potatoes and several other plants. It does degrade during composting, but if you grow nightshades, avoid it.
At around 400:1, sawdust carries almost no nitrogen relative to its carbon. Microbes breaking it down scavenge nitrogen from everything nearby. In a compost pile that simply slows things down. Dug directly into soil, it produces visible nitrogen deficiency in plants, yellowing lower leaves and stunted growth, that can persist for a full season.
Up to about 10% of the pile by volume, thoroughly mixed, alongside plenty of greens. Beyond that expect the pile to stall.
Coarse shavings are more forgiving than fine sawdust. Shavings keep the pile open and admit air; fine dust packs into a dense water-shedding layer that behaves rather like wet flour.
Sawdust is excellent as bedding in a chicken coop or a composting toilet, where it is later composted with a generous nitrogen source already mixed through it. It is also a good path mulch, where slow breakdown is a feature rather than a problem.
More materials in the material library. New to this? How to compost.
Independent sources worth reading alongside this page: EPA, Composting at Home · Cornell Waste Management Institute.