Arduino Battery Voltage

Hello everybody
I have a question, for my job, I need measuring battery voltage between 12v and 24v with tolerance (max 30v) and send this data with a WebService.

Somebody have an idea for make this little system ?

Best Regard Benjamin.

Build 5v voltage divider and then measure it with the Arduino's ADC

Use a board based on an ESP8266 or ESP32 as these can host a web page, perhaps a D1 Mini. Also maybe an MKR WiFi 1010 would be good too.