You can do this without a voltage divider as well, either by using a Zener, an LED across the input with a resistor in series with the sensor, or place a Schottky diode from the input to the 3.3 V rail.
Here are examples:
simulate this circuit – Schematic created using CircuitLab
P.S.: It is not clear what type of output is on your sensor. If it's an NPN open collector, you could simply use a pull-up resistor to the 3.3V rail, as others have indicated in their answers.