Offshore wind farm (OWF) is the largest renewable energy resource. The electrical interconnection cost of OWFs is a considerable fraction of the overall design cost of the farm. In order to minimize the investment and operational costs, this paper proposes an optimization formulation to find the optimal electrical interconnection configuration of wind turbines (WTs), and the optimal cable sizing simultaneously. This simultaneous minimization of total trenching length and cable dimensions creates a complex optimization problem that is solved by the harmony search (HS) algorithm. In this paper, two distinct methods of full and partial optimal cable sizing are considered to comprehensively assess the optimal interconnection layout of OWFs. Furthermore, various shipping and burying costs as well as various WTs power ratings are considered in order to investigate their impact on the optimal electrical interconnection system. The optimal electrical interconnection design obtained by the HS algorithm corresponds to a lower cost that together with the technological developments can help policy makers increase the use of offshore wind energy as a feasible unlimited renewable resource in their energy production portfolios.