Many offshore pipelines, risers and cables have already been constructed worldwide. Some of them have been designed to face various challenges related to the seabed characteristics and the potential geohazards. Undoubtedly, in areas that are characterized by moderate or high seismicity (such as the Mediterranean Sea) these challenges are greater since the earthquake-related geohazards (i.e., active seismic faults, soil-liquefaction phenomena and/or earthquake-triggered submarine landslides) may be present. The current paper, after a short description of the main offshore earthquake-related geohazards, describes a smart decision-support tool that has recently been developed by the authors and their students for: (a) the quantitative assessment of various geohazards along a specific route (i.e., the identification of the "problematic areas"), (b) the quantitative assessment of the structural distress (i.e., the identification of the "critical areas"), and (c) the consequent optimization of pipeline routing. The tool combines a geographic information system (GIS) with a commercial finite-element package capable to perform realistic geotechnical analyses and soil-structure interaction simulations. Apart from the geohazards, the tool may achieve the optimum routing taking also into consideration some other criteria, such as distance minimization or avoidance of "no-go" areas (e.g., shipwrecks or military explosives). The efficiency of the proposed tool has been verified in two case studies in the Mediterranean Sea and the results demonstrate its capability to handle, analyze, and manage all the available spatial data that are directly or indirectly related to geohazards (i.e., bathymetric, geological, geophysical, geotechnical, and seismological data) and to support the geoscientists and engineers to identify and avoid not the potentially problematic or problematic areas, but only the critical areas.