We consider copulas with a given diagonal section and compute the explicit density of the unique optimal copula which maximizes the entropy. In this sense, this copula is the least informative among the copulas with a given diagonal section. We give an explicit criterion on the diagonal section for the existence of the optimal copula and give a closed formula for its entropy. We also provide examples for some diagonal sections of usual bivariate copulas and illustrate the differences between them and the maximum entropy copula with the same diagonal section.