We report the observation of exponential localization of a Bose-Einstein condensate (BEC) released into a one-dimensional waveguide in the presence of a controlled disorder created by laser speckle . We operate in a regime allowing AL: i) weak disorder such that localization results from many quantum reflections of small amplitude; ii) atomic density small enough that interactions are negligible. We image directly the atomic density profiles vs time, and find that weak disorder can lead to the stopping of the expansion and to the formation of a stationary exponentially localized wave function, a direct signature of AL. Fitting the exponential wings, we extract the localization length, and compare it to theoretical calculations. Moreover we show that, in our one-dimensional speckle potentials whose noise spectrum has a high spatial frequency cut-off, exponential localization occurs only when the de Broglie wavelengths of the atoms in the expanding BEC are larger than an effective mobility edge corresponding to that cut-off. In the opposite case, we find that the density profiles decay algebraically, as predicted in [Phys. Rev. Lett. 98, 210401 (2007)]. The method presented here can be extended to localization of atomic quantum gases in higher dimensions, and with controlled interactions.