TL;DR
It depends on the backpack. Simple fabric backpacks usually handle a gentle machine cycle fine; structured, leather, or foam-padded ones do not.
A backpack that's been through a school year or a few camping trips can look and smell rough, and the washing machine feels like the obvious fix. For plain canvas or polyester bags, it usually is.
Where it gets risky is anything with a rigid frame, leather trim, foam back padding, or a waterproof coating. Those materials can warp, delaminate, or lose their coating in a machine built for soft fabric.
Check the Care Label First
Most backpacks have a small care tag sewn into an interior seam. A washing machine icon means it's designed for it; a hand-wash or spot-clean-only icon means the machine is a gamble. No tag at all usually points to hand washing, especially for bags with any structure.
How to Machine Wash a Backpack Safely
Empty every pocket, including the small front ones people forget. Remove detachable straps, hip belts, or metal frame stays if the design allows it. Turn the bag inside out if possible, close all zippers, and place it inside a mesh laundry bag or pillowcase to protect the machine's drum. Wash on a cold, gentle cycle with a small amount of mild detergent, and skip fabric softener, which can clog mesh panels.
What to Hand Wash Instead
Leather trim, suede accents, foam-padded straps, and bags with a laminated waterproof coating should be spot cleaned by hand with a damp cloth and mild soap. Machine agitation can crack foam padding, peel coatings, and pull leather out of shape.
Drying Without Ruining the Shape
Never put a backpack in the dryer — heat can warp plastic buckles, melt certain coatings, and shrink some fabrics. Instead, stuff the bag loosely with towels to help it hold its shape, and air dry it somewhere ventilated for 24 to 48 hours, paying attention to seams and interior pockets that trap moisture longest.
A basic fabric backpack can usually survive a gentle machine cycle, but anything with structure, leather, or a technical coating is safer washed by hand. When in doubt, the care label settles it.