In three dimensions, the pure Maxwell theory with a compact U(1) gauge group is dual to a free compact scalar, and it flows from the Maxwell theory with a noncompact gauge group in the ultraviolet to a noncompact free massless scalar theory in the infrared. We compute the vacuum disk entanglement entropy all along this flow and show that the renormalized entropy F(r) decreases monotonically with the radius r as predicted by the F-theorem, interpolating between a logarithmic growth for small r (matching the behavior of the S3 free energy) and a constant at large r (equal to the free energy of the conformal scalar). The calculation is carried out by the replica trick, employing the scalar formulation of the theory. The Rényi entropies for n>1 are given by a sum over winding sectors, leading to a Riemann-Siegel theta function. The extrapolation to n=1, to obtain the von Neumann entropy, is done by analytic continuation in the large- and small-r limits and by a numerical extrapolation method at intermediate values. We also compute the leading contribution to the renormalized entanglement entropy of the compact free scalar in higher dimensions. Finally, we point out some interesting features of the reduced density matrix for the compact scalar, and its relation to that for the noncompact theory.