The hierarchical structure of type I collagen fibrils is a key contributor to the mechanical properties of the extracellular matrix (ECM). It is known that the process of in vitro fibrillogenesis strongly depends on the pH of the collagen solution. To date, there are few methods available for precisely controlling and investigating the dependence of collagen fibril assembly on the local pH. The objective of this work was to create highly defined pH gradients to systematically determine the effects of local pH on microscale collagen fibrillogenesis and alignment. We use a microfluidic mixing device to create a diffusion controlled pH gradient, which in turn initiates the self-assembly and concurrent flow-alignment of soluble collagen. Finite element method simulations of the hydrodynamic and diffusive phenomena are used to calculate the local concentrations of the components involved in the reaction. We develop a model to analytically calculate the local pH in the microfluidic device from these concentrations. A comparison with the experimental results from polarized light microscopy are in good agreement with the simulations.