International audience; We present two novel methods, tested by LISA Pathfinder, to measure the gravitational constant G for the first time in space. Experiment 1 uses electrostatic suspension forces to measure a change in acceleration of a test mass due to a displaced source mass. Experiment 2 measures a change in relative acceleration between two test masses due to a slowly varying fuel tank mass. Experiment 1 gave a value of G=6.71±0.42(×10-11) m3 s-2 kg-1 and experiment 2 gave 6.15±0.35(×10-11) m3 s-2 kg-1, both consistent with each other to 1σ and with the CODATA 2014 recommended value of 6.67408±0.00031(×10-11) m3 s-2 kg-1 to 2σ. We outline several ideas to improve the results for a future experiment, and we suggest that a measurement in space would isolate many terrestrial issues that could be responsible for the inconsistencies between recent measurements.