Post weaning diarrhea (PWD) in pigs is a leading cause of economic loss in pork production worldwide. The current practice of using antibiotics and zinc to treat PWD is unsustainable due to the potential of antibiotic resistance and ecological disturbance, and novel methods are required. In this study, an in vitro model was used to test the possibility of producing prebiotic fiber in situ in the gastro-intestinal tract (GI-tract) of the piglet and the prebiotic activity of the resulting fiber in the terminal ileum. Soluble fiber were successfully produced from potato pulp, an industrial waste product, with a minimal enzyme dose in a simulated upper GI-model extracting 26.9 % of initial dry matter. The fiber was rich in galactose and galacturonic acid and was fermented at 2.5, 5 or 10 g/L in a glucose-free media inoculated with the gut contents of piglet terminal ileum. Fermentations of 5 g/L inulin or 5 g/L of a purified potato fiber were used as controls. The fibers showed high fermentability, evident by a dose-dependent drop in pH and increase in organic acids, with lactate in particularly being increased. Deep sequencing showed a significant increase in Lactobacillus and Veillonella and an insignificant increase in Clostridium as well as a decrease in Streptococcus. Multivariate analysis showed clustering of the treatment groups, with the purified potato fiber being clearly separated from the other groups as the microbiota composition was 60 % Lactobacillus and almost free of Clostridium. For animal studies, a dosage corresponding to the 5 g/L treatment is suggested.