A magnetic field sensor, comprising: a substrate (104; 156; 228); one or more magnetic field sensing elements (102; 152, 154; 222, 224, 225) disposed on the substrate and configured to generate a proximity signal (102a, 102b; 152a, 152b, 154a, 154b; 222a, 222b, 224a, 224b, 225a, 225b) responsive to a proximity of a ferromagnetic object; a processing module (121; 171; 241) disposed on the substrate, coupled to receive the proximity signal, and configured to convert the proximity signal to a two-state sensed-proximity signal representative of the proximity of the ferromagnetic object; a self-test module (136; 190; 272) disposed on the substrate and coupled to at least one of the processing module or the magnetic field sensing element, wherein the self-test module is configured to determine a passing condition or a failing condition of the magnetic field sensor, wherein the self-test module is configured to automatically make the determination without external command from outside the magnetic field sensor, and wherein the self-test module is configured to generate a self-test result signal representative of the passing condition and of the failing condition; and a format module (140, 142; 194, 196; 274, 276) disposed on the substrate and configured to generate a formatted signal in response to the self-test result signal, wherein the formatted signal has first signal characteristics when representative of the passing condition and has second different signal characteristics when representative of the failing condition, and wherein the first and second signal characteristics comprise at least one current or voltage pulse with at least one of different respective time durations, different respective current values, or different respective voltage values. a substrate (104; 156; 228); one or more magnetic field sensing elements (102; 152, 154; 222, 224, 225) disposed on the substrate and configured to generate a proximity signal (102a, 102b; 152a, 152b, 154a, 154b; 222a, 222b, 224a, 224b, 225a, 225b) responsive to a proximity of a ferromagnetic object; a processing module (121; 171; 241) disposed on the substrate, coupled to receive the proximity signal, and configured to convert the proximity signal to a two-state sensed-proximity signal representative of the proximity of the ferromagnetic object; a self-test module (136; 190; 272) disposed on the substrate and coupled to at least one of the processing module or the magnetic field sensing element, wherein the self-test module is configured to determine a passing condition or a failing condition of the magnetic field sensor, wherein the self-test module is configured to automatically make the determination without external command from outside the magnetic field sensor, and wherein the self-test module is configured to generate a self-test result signal representative of the passing condition and of the failing condition; and a format module (140, 142; 194, 196; 274, 276) disposed on the substrate and configured to generate a formatted signal in response to the self-test result signal, wherein the formatted signal has first signal characteristics when representative of the passing condition and has second different signal characteristics when representative of the failing condition, and wherein the first and second signal characteristics comprise at least one current or voltage pulse with at least one of different respective time durations, different respective current values, or different respective voltage values.