Diet modulates the gut microbiome, which in turn can impact the immune system. Here, we determined how two microbiota-targeted dietary interventions, plant-based fiber and fermented foods, influence the human microbiome and immune system in healthy adults. Using a 17-week randomized, prospective study (n = 18/arm) combined with -omics measurements of microbiome and host, including extensive immune profiling, we found diet-specific effects. The high-fiber diet increased microbiome-encoded glycan-degrading carbohydrate active enzymes (CAZymes) despite stable microbial community diversity. Although cytokine response score (primary outcome) was unchanged, three distinct immunological trajectories in high-fiber consumers corresponded to baseline microbiota diversity. Alternatively, the high-fermented-food diet steadily increased microbiota diversity and decreased inflammatory markers. The data highlight how coupling dietary interventions to deep and longitudinal immune and microbiome profiling can provide individualized and population-wide insight. Fermented foods may be valuable in countering the decreased microbiome diversity and increased inflammation pervasive in industrialized society.