Okay so I just accidentally bought a MCP23017 instead of MCP23018(this one is 5V tolerant) I don't have time to buy this one, because shipping to my country is painfully slow. Will be simple voltage divider sufficient? Im planning to use SainSmart 16-channel 12V relay module and some users report relay output 5V to gpio pin when it's off..
I am NOT an electronics type of person so treat what I say with caution.
I don't see that using the MCP23017 or the MCP23018 will make any difference.
You can power the MCP23017 from 5V (or slightly over) so it will feed 5V into the relay.
The problem will be that you might not be able to control the MCP23017/18 from the Pi if you power them from 5V.
The datasheet says the minimum voltage needed on the SCL/SDA lines to be seen as a logic 1 is 0.8 VCC, or 0.8 of the power supply voltage. If you power from 5V that means you will need SCL/SDA to be 4V. The Pi's I2C pull-ups are to 3V3, which is less than 4V. You should not use pull-ups higher than 3V3 on the Pi's I2C bus. You will damage the Pi.
To my mind a far simpler solution will be to use a couple of chips such as the ULN2003A or similar (they drive 7 or 8 outputs each, so you will need at least two for a 16-channel relay). They can be driven from the Pi and will safely switch the voltages you need.