We describe a new algorithm that automatically delineates the cliff top and toe of a cliffed coastline from a Digital Elevation Model (DEM). The algorithm builds upon existing methods but is specifically designed to resolve very irregular planform coastlines with many bays and capes, such as parts of the coastline of Great Britain. The algorithm automatically and sequentially delineates and smooth shoreline vectors, generates orthogonal transects and elevation profiles with a minimum spacing equal to the DEM resolution, and extracts the position and elevation of the cliff top and toe. Outputs include the non-smoothed-raster and smoothed-vector coastline, normals to the coastline- (as vector shapefiles), xyz profiles (as comma-separated-value files), and the cliff top and toe (as point shape files). The algorithm also automatically assesses the quality of the profile and omits low-quality profiles (i.e. extraction of cliff top and toe is not possible). The performance of the proposed algorithm is compared with an existing method, which was not specifically designed for very irregular coastlines, and to hand-digitized boundaries by numerous professionals. Also we assess the reproducibility of the results using different DEM resolutions (5 m, 10 m and 50 m), different user defined parameter-sets related to the degree of coastline smoothing, and the threshold used to identify the cliff top and toe. The model output sensitivity is found to be smaller than hand-digitized uncertainty. Code and a manual are publicly available on a github repository.