12v to 3.3 v logic level shifter?
simulate this circuit &ndash; Schematic created using CircuitLab

I would bet that a couple resistors and a clamping diode are ok if the environment is not too hostile (big motors, long cables, high currents...). 

You can also add a small capacitor in parallel with the diode, it aids in reducing spikes if any. The resistor R1 could (or probably should) be slightly bigger.