It will work if the higher voltage side is driving the lower voltage side.
The diode should face "from" the lower voltage side "to" the higher voltage side with pullups at the lower voltage side (ie. block current flow from the higher voltage signal to the lower voltage signal).
What happens:
- Higher voltage side is logic high - lower voltage side is pulled high (high=high)
- Higher voltage side is logic low - current flows through the diode and pulls the line low (low=low).
There is also a simpler hack - just place a resistor in series (eg. 2k2) and rely on the lower voltage side chip ESD protection diodes to clamp the higher voltage (eg. 5V to 3,3V, difference is 1,7V, resistor is 2k2, current flowing through the ESD protection diodes is less than 1mA, the maximum allowed clamping current is specified in the datasheet).