Purpose – Container shipping is a standardized business-to-business service market where carriers need to stay customer focused to survive. Market segmentation is an ideal solution to develop customized marketing programs for each segment, but container lines need personalized marketing programs for each customer. Hence, the purpose of this study is to develop a segmentation framework that can help container lines to profile each customer more efficiently considering their needs, strategic importance and demographics. Design/methodology/approach – This study has adopted an exploratory approach. Semi-structured interviews were conducted with managers of container lines. Findings – Segmentation bases are the type of customer, container volume, loyalty, seasonality, decision maker, the industry of shipper, cargo characteristics, container type, destination region and export/import. Market segmentation in container shipping can be helpful in developing effective customized marketing offering, including effective price discrimination and customized marketing communications. Practical implications – A port-specific segmentation approach was adopted and a flexible segmentation framework was proposed for container lines to adapt in different hinterlands. Originality/value – Unlike the literature, this study suggests market segmentation can be very helpful in customized marketing in business-to-business services like container shipping industry. This study also suggests port-specific market segmentation for container lines instead of route-specific.