A potential divider is perfectly fine (as long as the sensor ouptut is not open collector, see my last suggestion below):
simulate this circuit – Schematic created using CircuitLab
The relationship between input and output potentials is:
$$ V_{OUT} = V_{IN} \times \frac{R_2}{R_1+R_2} $$
If there's any chance that the input might stray outside the bounds 0V to 12V, this will also restrict current flowing via the input protection diodes of the GPIO line.
If you wish to power your hall sensors from 5V, you need to increase R2 to compensate. Use the above formula to solve for an appropriate R1, given \$V_{IN}=+5V\$.
If you can't yet decide whether to power your sensor from a 12V or 5V supply (or anything over 5V for that matter), then you can clamp the signal's potential with a zener diode, to handle almost any maximum input potential:
That gets you this response (Y axis), from an input (X axis) sweeping from 0V to +12V:
I suspect that your sensor may have an open collector (or open drain) output, in which case, the solution is even simpler:
No protection necessary here, just a single pull-up resistor to +3.3V, but beware that if the sensor output is not open collector, you'll break the GPIO. Check the sensor's datasheet!