Switchable mirrors are promising materials for energy-saving windows. They are switched between their reflective and transparent states by hydrogenation and dehydrogenation. We have developed gasochromic and electrochromic (EC) switchable mirrors which contain a ternary Mg–Zr–Ni alloy instead of a binary Mg-based alloy, such as Mg–Ni, Mg–Ti, or Mg–Ca. The additional elements in the Mg alloys improve the optical switching properties, and hydrogen-permeable Zr–Ni alloy membranes do not become embrittled by hydrogen and have a high hydrogen permeation rate. Both types of switchable mirror with the Mg–Zr–Ni thin film exhibited optical switching properties, which depended strongly on the composition of the thin film. In both the gasochromic and EC mirrors the switching speed increased as the zirconium and nickel content of the film was increased, although the maximum transmittance decreased. The environmental durability of the EC mirror was investigated using a thermostat/humidistat bath. The durability increased with the zirconium and nickel content of the alloy thin film, and films with a high magnesium content degraded more rapidly.