Eddies with length scales of 1-10 km are commonly observed in coastal waters and play an important role in the dispersion of water-borne materials. The generation and evolution of these eddies by oscillatory tidal flow around coastal headlands is investigated with analytical and numerical models. Using shallow water depth-averaged vorticity dynamics, eddies are shown to form when flow separation occurs near the tip of the headland, causing intense vorticity generated along the headland to be injected into the interior. An analytic boundary layer model demonstrates that flow separation occurs when the pressure gradient along the boundary switches from favoring (accelerating) to adverse (decelerating), and its occurrence depends principally on three parameters: the aspect ratio [b/a], where b and a are characteristic width and length scales of the headland; [H/CDa], where H is the water depth, CD is the depth-averaged drag coefficient; and [Uo/aa], where Uo and a are the magnitude and frequency of the far-field tidal flow. Simulations with a depth-averaged numerical model show a wide range of responses to changes in these parameters, including cases where no separation occurs, cases where only one eddy exists at a given time, and cases where bottom friction is weak enough that eddies produced during successive tidal cycles coexist, interacting strongly with each other. These simulations also demonstrate that in unsteady flow, a strong start-up vortex forms after the flow separates, leading to a much more intense patch of vorticity and stronger recirculation than found in steady flow.