The mucus barrier is selectively permeable to a wide variety of molecules, proteins, and cells, and establishes gradients of these particulates to influence the uptake of nutrients, the defense against pathogens, and the delivery of drugs. Despite its importance for health and disease, the criteria that govern transport through the mucus barrier are largely unknown. Studies with uniformly functionalized nanoparticles have provided critical information about the relevance of particle size and net charge for mucus transport. However, these particles lack the detailed spatial arrangements of charge found in natural mucus-interacting substrates, such as certain viruses, which may have important consequences for transport through the mucus barrier. Using a novel, to our knowledge, microfluidic design that enables us to measure real-time transport gradients inside a hydrogel of mucins, the gel-forming glycoprotein component of mucus, we show that two peptides with the same net charge, but different charge arrangements, exhibit fundamentally different transport behaviors. Specifically, we show that certain configurations of positive and negative charges result in enhanced uptake into a mucin barrier, a remarkable effect that is not observed with either charge alone. Moreover, we show that the ionic strength within the mucin barrier strongly influences transport specificity, and that this effect depends on the detailed spatial arrangement of charge. These findings suggest that spatial charge distribution is a critical parameter to modulate transport through mucin-based barriers, and have concrete implications for the prediction of mucosal passage, and the design of drug delivery vehicles with tunable transport properties.