Voltage divider to act as analogue input

Could I use a simple voltage divider to drop a 12V input down to under 5V for use as an analogue input?

It is only a 12V switched input that’s either 12V or 0V so the “if else” control is simple just wanted to know if this would place too much load on the input pins. I wouldn’t think so as there’s no real load on the circuit so the current would be minimal. Am I correct?