Do you have a multimeter? ...Just to make sure you don't connect 12V to your Arduino and kill it.
A voltage divider is the solution. For example, a 3:1 voltage regulator made with a 10K resistor and a 20K resistor will knock 12V down to 4V. You don't have to use those exact values ,but that's the idea. Values around 10K are good because the current is relatively low and noise should be low or manageable. (Higher resistance/impedance is more prone to noise pickup.)
Then you just have to figure-out the ratio between the ADC and voltage... With the default 5V reference 5V reads 1023, so 4V would read 818. But of course, that means 818 is actually 12V into the voltage divider. The accuracy will depend on the accuracy of the 5V reference and the resistor accuracy (tolerance) so you might want to calibrate with a known good voltmeter.
Of course, test that with the serial monitor like the Analog Read Serial and Analog Read Voltage examples before you play-around with Wi-Fi.
That's the easy part... Most of your work will go into the Wi-Fi stuff.