Mastitis in dairy cows is a worldwide problem faced by dairy producers. Treatment mainly involves antibiotic therapy, however, due to widespread antibiotic resistance among bacteria, such treatments are no longer effective. For this reason, scientists are searching for new solutions to combat mastitis, which is caused by bacteria, fungi, and algae. One of the most promising solutions, nanotechnology, is attracting research due to its biocidal properties. The purpose of this research was to determine the biocidal properties of nanocomposites as a potential alternative to antibiotics in the control of mastitis, as well as to determine whether the use of nanoparticles and what concentration is safe for the breeder and the animal. In this study, the effects of Ag, Au, Cu, Fe, and Pt nanoparticles and their complexes were evaluated in relation to the survival of bacteria and fungi isolated from cattle diagnosed with mastitis, their physicochemical properties, and their toxicity to bovine and human mammary epithelial cells BME-UV1 and HMEC (human microvascular endothelial cells). Moreover, E. coli, S. aureus, C. albicans, and Prototheca sp. invasion was assessed using the alginate bead (bioprinted) model. The NPs were tested at concentrations of 25, 12.5, 6.25, 3.125, 1.56 mg/l for Au, Ag, Cu and Fe NPs, and 10, 5, 2.5, 1.25, 0.625 mg/l for Pt. With the exception of Fe and Pt, all exhibited biocidal properties against isolates, while the AgCu complex had the best effect. In addition, nanoparticles showed synergistic effects, while the low concentrations had no toxic effect on BME-UV1 and HMEC cells. Synergistic effects of nanoparticles and no toxicity to bovine and human cells might, in the future, be an effective alternative in the fight against microorganisms responsible for mastitis, and the implementation of research results in practice would reduce the percentage of dairy cows suffering from mastitis. The problem of increasing antibiotic resistance is posing a global threat to human's and animal's health, and requires comprehensive research to evaluate the potential use of nanoparticles - especially their complexes - as well as to determine whether nanoparticles are safe for the breeders and the animals. The conducted series of studies allows further consideration of the use of the obtained results in practice, creating a potentially new alternative to antibiotics in the treatment and prevention of mastitis in dairy cattle.