We experimentally demonstrate that one-dimensional Bose-Einstein condensates brought close to microfabricated wires on an atom chip are a very sensitive sensor for magnetic and electric fields reaching a sensitivity to potential variations of ~10–14 eV at 3 µm spatial resolution. We measure a two-dimensional magnetic field map 10 µm above a 100-µm-wide wire and show how the transverse current-density component inside the wire can be reconstructed. The relation between the field sensitivity and the spatial resolution is discussed and further improvements utilizing Feshbach-resonances are outlined.