The direct electrochemical oxidation of dry hydrocarbon fuels to generate electrical power has the potential to accelerate substantially the use of fuel cells in transportation and distributed-power applications. Most fuel-cell research has involved the use of hydrogen as the fuel, although the practical generation and storage of hydrogen remains an important technological hurdle. Methane has been successfully oxidized electrochemically, but the susceptibility to carbon formation from other hydrocarbons that may be present or poor power densities have prevented the application of this simple fuel in practical applications. Here we report the direct, electrochemical oxidation of various hydrocarbons (methane, ethane, 1-butene, n-butane and toluene) using a solid-oxide fuel cell at 973 and 1,073 K with a composite anode of copper and ceria (or samaria-doped ceria). We demonstrate that the final products of the oxidation are CO2 and water, and that reasonable power densities can be achieved. The observation that a solid-oxide fuel cell can be operated on dry hydrocarbons, including liquid fuels, without reforming, suggests that this type of fuel cell could provide an alternative to hydrogen-based fuel-cell technologies.