Purpose - Manufacturing industries these days gives importance to reduce the energy consumption due to the increase in energy prices and to create an environmental friendly industry. Robotic assembly lines (RALs) are used in an industry for assembling different types of products in an assembly line due to the flexibility it offers to the production system. Since different types of robots are available with different specialization and capabilities, there is a requirement of efficiently balancing the assembly line by allocating equal amount of tasks to the workstations and allocate the best fit robot to perform the allocated tasks. The purpose of this paper is to maximize the line efficiency by minimizing the total energy consumption in a U-shaped RAL. Design/methodology/approach - Particle swarm optimization (PSO) and differential evolution (DE) are the two evolutionary algorithms used as the optimization tool to solve this problem. Performance of these proposed algorithm are tested on a set of randomly generated problems which are generated using the benchmark problems available in the open literature and the results are reported. Findings - The proposed algorithms are found to be useful to reduce the total energy consumption on an assembly line which maximizes the line efficiency. It is found that DE algorithm could improve the line efficiency than PSO algorithm. Computational time taken by the two algorithms are also reported. Originality/value - Till date, no research has been reported on optimizing the line efficiency by minimizing the total energy consumption in a U-shaped RAL systems. PSO and DE are the two evolutionary algorithms used as the optimization tool to solve this problem. © Emerald Group Publishing Limited. 0264-4401.