The Ryu-Takayanagi formula relates the entanglement entropy in a conformal field theory to the area of a minimal surface in its holographic dual. We show that this relation can be inverted for any state in the conformal field theory to compute the bulk stress-energy tensor near the boundary of the bulk spacetime, reconstructing the local data in the bulk from the entanglement on the boundary. We also show that positivity, monotonicity, and convexity of the relative entropy for small spherical domains between the reduced density matrices of any state and of the ground state of the conformal field theory are guaranteed by positivity conditions on the bulk matter energy density. As positivity and monotonicity of the relative entropy are general properties of quantum systems, this can be interpreted as a derivation of bulk energy conditions in any holographic system for which the Ryu-Takayanagi prescription applies. We discuss an information theoretical interpretation of the convexity in terms of the Fisher metric.