Does Vomiting Worms Mean Infestation?

Why would my dog have vomited worms?

It sounds like your dog has a heavy infestation of worms. This is quite common in puppies but unusual in older dogs. The most likely parasite is roundworm, which often looks like 5-8cm spaghetti strands. Roundworm can cause vomiting/diarrhea and can be life threatening if untreated. I would recommend an immediate visit to the vet to confirm which type of worm your dog is infected with and to get suitable treatment. This is especially important as some dog parasites can be transferred to humans.