Robotic swimmers are currently a subject of extensive research and development for several underwater applications. Clever design and planning must rely on simple theoretical models that account for the swimmer’s hydrodynamics in order to optimize its structure and control inputs. In this work, we study a planar snake-like multi-link swimmer by using the “perfect fluid” model that accounts for inertial hydrodynamic forces while neglecting viscous drag effects. The swimmer’s dynamic equations of motion are formulated and reduced into a first-order system due to symmetries and conservation of generalized momentum variables. Focusing on oscillatory inputs of joint angles, we study optimal gaits for 3-link and 5-link swimmers via numerical integration. For the 3-link swimmer, we also provide a small-amplitude asymptotic solution which enables obtaining closed-form approximations for optimal gaits. The theoretical results are then corroborated by experiments and motion measurement of untethered robotic prototypes with three and five links floating in a water pool, showing a reasonable agreement between the experiments and the theoretical model.