We demonstrate that the magnetic anisotropy in SrRuO3 (SRO) ultrathin films can be well controlled by thickness or electrical modulations: The easy axis (preferred magnetization direction) of a SRO ultrathin film can be switched between out-of-plane and in-plane magnetization either by altering the film thickness or by tuning the doping level through applying a gate voltage or chemical doping. Such a capability to manipulate the magnetocrystalline anisotropy energy (MCAE) is given by the spin–orbit coupling (SOC)-induced energy splitting in the spin-polarized quantum well states (QWSs) near the Fermi level. These QWSs are susceptible to the intrinsic spin–orbit interaction and thus drive a large energy discrepancy when an SRO ultrathin film rotates its magnetization direction. As a result of the MCAE nature, a SRO film has a magnetic anisotropy approximately an order of magnitude larger than those in 3d-ferromagnet ultrathin films and its easy-axis direction depends on the film thickness, gate voltage, and substrate. This tunable large magnetic anisotropy in SRO ultrathin films provides an excellent route toward advanced spintronic devices such as storage and memory devices.