We discuss the application of Bose-Einstein condensates (BECs) as sensors for magnetic and electric fields. In an experimental demonstration we have brought one-dimensional BECs close to micro-fabricated wires on an atom chip and thereby reached a sensitivity to potential variations of ~10e-14eV at 3 micron spatial resolution. We demonstrate the versatility of this sensor by measuring a two-dimensional magnetic field map 10 micron above a 100-micron-wide wire. We show how the transverse current-density component inside the wire can be reconstructed from such maps. The field sensitivity in dependence on the spatial resolution is discussed and further improvements utilizing Feshbach resonances are outlined.