Putting sand in a bird cage is generally not advised. Fine sand or dust can be ingested, causing digestive problems and nutritional imbalances. Sand may also contain harmful bacteria, parasites, or sharp objects that can injure birds.
Safer alternatives include cage liners made of recycled paper or natural fibers, shredded paper, wood shavings or sawdust (depending on species), commercial bird substrate pellets, or natural grass clippings. If sand is necessary for dust bathing, it should be clean, fine-grained, and placed in a separate container rather than scattered on the cage floor.
Consult an avian veterinarian to determine the best substrate for your bird species.