Abstract The optimal ship hull form in contemporary design practice primarily consists of three parts: hull form modification, performance prediction, and optimization. Hull form modification is a crucial step to affect optimization efficiency because the baseline hull form is varied to search for performance improvements. The conventional hull form modification methods mainly rely on human decisions and intervention. As a direct expression of the three-dimensional hull form, the lines are not appropriate for machine learning techniques. This is because they do not explicitly express a meaningful performance metric despite their relatively large data dimension. To solve this problem and develop a novel machine-based hull form design technique, an autoencoder, which is a dimensional reduction technique based on an artificial neural network, was created in this study. Specifically, a convolutional autoencoder was designed; firstly, a convolutional neural network (CNN) preprocessor was used to effectively train the offsets, which are the half-width coordinate values on the hull surface, to extract feature maps. Secondly, the stacked encoder compressed the feature maps into an optimal lower dimensional-latent vector. Finally, a transposed convolution layer restored the dimension of the lines. In this study, 21 250 hull forms belonging to three different ship types of containership, LNG carrier, and tanker, were used as training data. To describe the hull form in more detail, each was divided into several zones, which were then input into the CNN preprocessor separately. After the training, a low-dimensional manifold consisting of the components of the latent vector was derived to represent the distinctive hull form features of the three ship types considered. The autoencoder technique was then combined with another novel approach of the surrogate model to form an objective function neural network. Further combination with the deterministic particle swarm optimization method led to a successful hull form optimization example. In summary, the present convolutional autoencoder has demonstrated its significance within the machine learning-based design process for ship hull forms.