This letter demonstrates the thermo-optic switching function using an adjustable optical well structure, which is constructed by a thin air gap sandwiched between two micromachined hemicylindrical prisms. The device is etched on a silicon-on-insulator wafer within a footprint of 400x400 mu m(2). In experiment, it measures an extinction ratio of 30.2 dB and a switching time of 2.2 mu s. Compared with the other demonstrated switches that have optical barrier structures, this device is unique in the working principle and optical design, and shows various merits such as high extinction ratio, fast speed, low power consumption, and small size. (c) 2007 American Institute of Physics.