Electron spins in gate-defined quantum dots provide a promising platform for quantum computation(1-7). In particular, spin based quantum computing in gallium arsenide takes advantage of the high quality of semiconducting materials, reliability in fabricating arrays of quantum dots and accurate qubit operations(5-10). However, the effective magnetic noise arising from the hyperfine interaction with uncontrolled nuclear spins in the host lattice constitutes a major source of decoherence(4,5,10,11) .Low-frequency nuclear noise, responsible for fast (10 ns) inhomogeneous dephasings(5), can be removed by echo techniques(4,5,11-14.) High-frequency nuclear noise, recently studied via echo revivals(4,11), occurs in narrow-frequency bands related to differences in Larmor precession of the three isotopes Ga-69, Ga-71 and As-75 (refs 15-17). Here, we show that both low-and high-frequency nuclear noise can be filtered by appropriate dynamical decoupling sequences, resulting in a substantial enhancement of spin qubit coherence times. Using nuclear notch filtering, we demonstrate a spin coherence time (T-2) of 0.87 ms, five orders of magnitude longer than typical exchange gate times, and exceeding the longest coherence times reported to date in Si/SiGe gate-defined quantum dots(18,19).