A laminar-flow dye cell with continuously variable thickness (tunable without removal of the dye solution) provides an excellent way of optimizing passively mode-locked lasers. Varying the cell thickness adjusts low-light-level transmittance to match the total cavity and excitation energy conditions and also varies pulse duration. Acceptable cell thicknesses and dye concentrations can be calculated theoretically using well-known parameters. The cell can be conveniently returned to compensate for dye degradation or to provide conditions for Q switching. Experimental evidence is presented for a Nd:YAG laser.