A variable optical attenuator based on electrostatic bending of a silicon-on-insulator rib waveguide was designed and fabricated. Microelectromechanical system fabrication techniques were used to remove the underlying silica layer in a section of a silicon-on-insulator waveguide, creating a deformable beam structure. The observed dependence of the optical attenuation on applied voltage agreed well with numerical modeling, which indicates that the attenuation is due to conversion to lossy higher order modes at the waveguide bends rather than radiation into the air cover or the substrate. Electrostatic zipping actuation was shown to be more effective in achieving sufficient curvature than direct bending of a fixed-fixed beam before pull in. A typical 1mm long device showed a maximum voltage tunable attenuation of up to 14dB.