To charge two 12 volt batteries in series youd need a 24 volt charger. Thats the pat answer.

How To Charge Your Battery Bank With A Fossil Fuel Generator
Charging 4 12v batteries in series. Some chargers have a light that illuminates once charged. Using like sealed vs. For the final battery connect the negative end of the battery to the negative output in black of the charger. Charge all the batteries at the same time. One basic configuration for charging batteries in series is to connect the positive charger output in red to the positive end of one of the batteries. Turn on your charger ensuring it is set to charge at 12 volts.
Let your batteries charge until the charger indicates they are fully charged. Before doing anything that i suggest below make sure your batteries are 12v lead acid batteries. This means you have a fully charged 48v battery pack with each battery at the same state of charge. Discharging down do 80 depth of discharge 600 700 on average. Charge more than five batteries by connecting one 12 volt battery charger across each battery in the series as if each battery were the only one being charged. After your 4 12v batteries are all topped off take them out of parallel and wire them in series.
A 12v agm battery on average has only 150. Of the smaller battery through the over discharging and over recharging described and shorten the life of the larger battery through under charging. Note that a 12v battery will charge to approx. You need to overcome the total voltage of the series batteries 12 v 12 v 24 v to drive. 147v total and then float around 135v. Li ion batteries do not follow the advice below.
As in the diagram above two 6 volt 45 ah batteries wired in series are capable of providing. Plug in your charger to the electricity supply. If they are some other chemistry eg. Use another set of cables to connect the open positive and negative terminals to your application. Assuming you have la batteries that means you probably have 4 12v batteries that are connected in series which 48v 4 batts 12v. In theory a 6 volt 5 ah battery and a 12 volt 5 ah battery connected in series will give a.
Maintenance over time it is good to check your individual batteries with a voltmeter. Charging only some of the batteries will result in batteries attempting to equal out the power and charging each other. You could also use four separate 12 volt chargers each one charging one of the four 12 volt batteries making up the 48 volt bank as long as the outputs of the chargers are not connected to each other except at the batteries. Two 6 volt batteries in series vs one 12 volt life cycles. To connect batteries in a series use jumper wire to connect the negative terminal of the first battery to the positive terminal of the second battery. Then connect the negative end of the battery to the positive end of the next one and continue to do so for the rest of your batteries.
By charging 6 volt batteries in series with a 12 volt charger you allow your off grid electrical the true capacity it needs. Others have a meter that shows the charge rate and once its near zero your batteries are charged. 6 volt agm battery has more life cycles.