It has been shown in vitro that only specific dietary fibers contribute to immunity, but studies in vivo are not conclusive. Here, we investigated degree of polymerization (DP) dependent effects of beta 2 ->1-fructans on immunity via microbiota-dependent and-independent effects. To this end, conventional or germ-free mice received short-or long-chain beta 2 ->1-fructan for 5 days. Immune cell populations in the spleen, mesenteric lymph nodes (MLNs), and Peyer's patches (PPs) were analyzed with flow cytometry, genome-wide gene expression in the ileum was measured with microarray, and gut microbiota composition was analyzed with 16S rRNA sequencing of fecal samples. We found that beta 2 ->1-fructans modulated immunity by both microbiota and microbiota-independent effects. Moreover, effects were dependent on the chain-length of the beta 2 ->1-fructans type polymer. Both short-and long-chain beta 2 ->1-fructans enhanced T-helper 1 cells in PPs, whereas only short-chain beta 2 ->1-fructans increased regulatory T cells and CD11b(-)CD103(-)dendritic cells (DCs) in the MLN. A common feature after short-and long-chain beta 2 ->1-fructan treatment was enhanced 2-alpha-L-fucosyltransferase 2 expression and other IL-22-dependent genes in the ileum of conventional mice. These effects were not associated with shifts in gut microbiota composition, or altered production of short-chain fatty acids. Both short-and long-chain beta 2 ->1-fructans also induced immune effects in germ-free animals, demonstrating direct effect independent from the gut microbiota. Also, these effects were dependent on the chain-length of the beta 2 ->1-fructans. Short-chain beta 2 ->1-fructan induced lower CD80 expression by CD11b(-)CD103(-) DCs in PPs, whereas long-chain beta 2 ->1-fructan specifically modulated B cell responses in germ-free mice. In conclusion, support of immunity is determined by the chemical structure of beta 2 ->1-fructans and is partially microbiota independent.