Flow rates play an important role in microfluidic devices because they affect the transport of chemicals and determine where and when (bio)chemical reactions occur in these devices. Flow rates can conveniently be determined using external peripherals in active microfluidics. However, setting specific flow rates in passive microfluidics is a significant challenge because they are encoded on a design and fabrication level, leaving little freedom to users for adjusting flow rates for specific applications. Here, we present a programmable hydraulic resistor where an array of “electrogates” routes an incoming liquid through a set of resistors to modulate flow rates in microfluidic chips post-fabrication. This approach combines a battery-powered peripheral device with passive capillary-driven microfluidic chips for advanced flow rate control and measurement. We specifically show a programmable hydraulic resistor composed of 7 parallel resistors and 14 electrogates. A peripheral and smartphone application allow a user to activate selected electrogates and resistors, providing 127 (27-1) flow resistance combinations with values spanning on a 500 fold range. The electrogates feature a capillary pinning site (i.e. trench across the flow path) to stop a solution and an electrode, which can be activated in a few ms using a 3 V bias to resume flow based on electrowetting. The hydraulic resistor and microfluidic chip shown here enable flow rates from ~0.09 nL.s−1 up to ~5.66 nL.s−1 with the resistor occupying a footprint of only 15.8 mm2 on a 1 × 2 cm2 microfluidic chip fabricated in silicon. We illustrate how a programmable hydraulic resistor can be used to set flow rate conditions for laminar co-flow of 2 liquids and the enzymatic conversion of a substrate by stationary enzymes (alkaline phosphatase) downstream of the programmable hydraulic resistor.