CD 4504B from 12 V digital to 5 V digital level shifting
Sure, you could use that, but you'd have to make sure the '12V' input has no transients that exceed 20V or so, depending on the exact part number, or add a series resistor such as 10K to the 12V input. 

For a single input, you could use an NPN BJT with a couple resistors on it, which can be pretty much bulletproof (inverts the signal), and even more so if you add a diode from base to emitter. Or even use an optoisolator, which provides even more protection. 







simulate this circuit &ndash; Schematic created using CircuitLab