Rooting itself doesn't erase data, but if something goes wrong, there might be data loss. Therefore, it's crucial to back up your data before rooting.