Engineering the fluid interface such as the gas-liquid interface is of great significance for solvent processing applications including functional material assembly, inkjet printing, and high-performance device fabrication. However, precisely controlling the fluid interface remains a great challenge owing to its flexibility and fluidity. Here, a general method to manipulate the fluid interface for fluid patterning using micropillars in the microchannel is reported. The principle of fluid patterning for immiscible fluid pairs including air, water, and oils is proposed. This understanding enables the preparation of programmable multiphase fluid patterns and assembly of multilayer functional materials to fabricate micro-optoelectronic devices. This general strategy of fluid patterning provides a promising platform to study the fundamental processes occurring on the fluid interface, and benefits applications in many subjects, such as microfluidics, microbiology, chemical analysis and detection, material synthesis and assembly, device fabrication, etc.