We demonstrate entanglement generation of two neutral atoms trapped inside an optical cavity. Entanglement is created from initially separable two-atom states through carving with weak photon pulses reflected from the cavity. A polarization rotation of the photons heralds the entanglement. We show the successful implementation of two different protocols and the generation of all four Bell states with a maximum fidelity of (90±2)%. The protocol works for any distance between cavity-coupled atoms, and no individual addressing is required. Our result constitutes an important step towards applications in quantum networks, e.g., for entanglement swapping in a quantum repeater.