We consider 3D free-boundary compressible ideal magnetohydrodynamic (MHD) system under the Rayleigh-Taylor sign condition. It describes the motion of a free-surface perfect conducting fluid in an electro-magnetic field. The local wellposedness was recently proved by Trakhinin and Wang [66] by using Nash-Moser iteration. In this paper, we prove the a priori estimates without loss of regularity for the free-boundary compressible MHD system in Lagrangian coordinates in anisotropic Sobolev space, with more regularity tangential to the boundary than in the normal direction. It is based on modified Alinhac good unknowns, which take into account the covariance under the change of coordinates to avoid the derivative loss; full utilization of the cancellation structures of MHD system, to turn normal derivatives into tangential ones; and delicate analysis in anisotropic Sobolev spaces. Our method is also completely applicable to compressible Euler equations and thus yields an alternative estimate for compressible Euler equations without the analysis of div-curl decomposition or the wave equation in Lindblad-Luo [42], that do not work for compressible MHD. To the best of our knowledge, we establish the first result on the energy estimates without loss of regularity for the free-boundary problem of compressible ideal MHD. * in the second equation of (1.17), we getIn the energy estimates, we need to commute ∇ A with ∂ I * and then integrate by parts. However, the commutator [∂ I * , A li ]∂ l f contains the following terms whose L 2 (Ω)-norms cannot be controlled in the anisotropic Sobolev space), which cannot be controlled even in the standard Sobolev spaces when i 0 = 0;where f = Q or v i and I ′ is a multi-index with I ′ = 1. To overcome such difficulty, we can use the ideas of the Alinhac good unknown method, i.e., we can rewrite ∂ I * (∇ A Q) and ∂ I * (∇ A • v) in terms of the sum of the covariant derivative part and the commutator part satisfying(1.25)