You really don't want your smartphone or smart car going up in flames due to an overheating battery. Now scientists have figured out how to embed a flame-extinguishing chemical into standard batteries to stop this from happening.

As safe as modern-day batteries are built to be, there's always a small fire risk if the device isn't handled properly or hasn't been comprehensively tested. But this new technology is hoping to remove that risk completely.

The research should enable us to build bigger and more powerful batteries for the phones, cars, and houses of the future, according to the team from the University of Tokyo in Japan that worked on its development.

The lithium-ion batteries most commonly used everywhere from phones to electric cars, and the up-and-coming sodium-ion battery technology, both make use of organic electrolytes to enable the flow of electrical charge through the battery.

These types of electrolytes are picked for their support of high voltages, but they also come with the fire risk we just mentioned, using a choice of lithium salts and solvents.

The new research, like so much research into battery technology, involves tweaking the chemical mix of that electrolyte inside the battery.

"An ultimate solution to battery fires and explosions is to use a nonflammable electrolyte," explain the researchers in their paper. "However, non-flammable electrolyte design has always been accompanied by an undesirable compromise in battery performance."

The team focussed on using a flame-retardant solvent called trimethyl phosphate (TMP) as part of the electrolyte to cut out the fire risk, finding that stable discharges could be achieved for 1,000 cycles or more than a year, without any noticeable degradation.

That's at least as good, if not better, than the lithium-ion batteries in use today.

At the same time, they upped the concentration of salt in the electrolyte, reducing the overall volatility of the mixture, and ensuring that high voltage levels could be maintained at the battery anodes, which usually isn't the case with non-flammable solvents like TMP.

"By applying [the electrolytes] to sodium-ion and lithium-ion batteries, we demonstrate a highly stable charge–discharge reaction at both hard-carbon and graphite anodes for over one year, validating our strategy to develop safe and long-lasting rechargeable batteries," explain the researchers.

Based on their tests, the new solutions showed "negligible volatility" up to 150°C (302°F), which is good news if you don't want your phone catching fire in your pocket no matter how hot it might get.

What's more, when flames were eventually ignited at even higher temperatures, the TMP solution put them out instantly, stifling the combustion reaction at source.

The scientists say this approach to designing battery electrolytes can be extended to other flame-retardant and non-flammable solvents besides TMP, so there's a lot of potential here for taking the next step up in battery size and power.

As with any kind of innovative battery technology, it's going to take a while for this research to make its way from the lab all the way to the phones we carry around in our pockets, but it's a promising step in the right direction.

And it's all thanks to simply tweaking the chemical mix of the electrolyte.

"The electrolyte is no longer a fuel but serves as an efficient extinguisher of a fire that might be supported by other flammable materials in a battery," conclude the researchers.

The findings have been published in Nature Energy.