How to read high voltage from isolated circuit using arduino

I'm working on a project that includes a logic circuit which switches a battery using a MOSFET. The battery provides 12V, and I'm using a boost converter to step it up to around 1000V in order to charge a capacitor.

Now, I want to monitor the voltage across the capacitor using an Arduino. The idea is to stop the charging process once the capacitor reaches a certain voltage.

What is the best and safest way to read such a high voltage (up to 1000V) using an Arduino, considering it can only handle 0–5V analog input?

Any advice or circuit examples (like voltage dividers, isolation methods, etc.) would be greatly appreciated.

I recommend a linear optocoupler like the IL300, LOC110 etc.
It's the safest way

What is the load that that voltage can tolerate.
Just use a voltage divider with high-voltage/high resistance resistors.
Leo

@Wawa gives you a good solution assuming the Arduino is powered by the same battery. Be sure to put a small cap on the A/D input as the divider impedance will be to high for a stable reading. I am assuming the ground for the Arduino and the HV circuit are the same.