In recent years, unquestionable warnings like the negative effects of CO2 emissions, the necessity of utilizing sustainable energy sources, and the rising demand for municipal electrification have been issued. Therefore, users are encouraged to provide off-grid and sustainable energy systems for their own homes and businesses, especially if they are located rurally and far from grids. Hence, this study aims to design an off-grid hybrid energy system, in order to minimize both the baseline cost of energy and the net current expenditure in the desired system. To construct such a system, wind generators (WG), photovoltaic arrays (PV), battery banks, and bi-directional converters are considered in the real case of a supermarket with a 20-year lifespan in Malmö, Sweden. Some significant assumptions, such as the usage of renewable energy resources only, electricity production close to the business location, and a maximum allowance of 0.1% unmet are incorporated. To optimize the considered problem, a particle swarm optimization (PSO) approach as developed to provide the load requirements and establish the number of WGs, PVs, and other equipment. Moreover, to verify the obtained results, the developed system was simulated using HOMER Pro software, and the results are compared and discussed. The results indicated that the designed hybrid energy system is able to perform completely off-grid, while satisfying 99.9% of the yearly electricity demand. The best results obtained by the proposed PSO offered 160, 5, and 350 PVs, WGs, and batteries, respectively, while the best solution found by the simulation method was the use of 384 PVs, 5 WGs, and 189 batteries for the considered off-grid system. This study contributes to decentralized local electrification by utilizing renewable energy sources that have the potential to revolutionize green energy solutions.