Yes, that is what a UPS does, however, unless you spend quite a bit of money, they are really only used to give you enough time to power down your system to prevent damage in case of a power outage. Not really meant to be used as a battery pack for extended use.