Abstract: Molten salt electrolytes are described for use in electrochemical synthesis of hydrocarbons from carboxylic acids. The molten salt electrolyte can be used to synthesize a wide variety of hydrocarbons with and without functional groups that have a broad range of applications. The molten salt can be used to synthesize saturated hydrocarbons, diols, alkylated aromatic compounds, as well as other types of hydrocarbons. The molten salt electrolyte increases the selectivity, yield, the energy efficiency and Coulombic efficiency of the electrochemical conversion of carboxylic acids to hydrocarbons while reducing the cell potential required to perform the oxidation.