Genesis 50:20

You devised evil against me. But God turned it into good, so that he might exalt me, just as you presently discern, and so that he might bring about the salvation of many peoples

Other versions

King James Version

But as for you, ye thought evil against me; but God meant it unto good, to bring to pass, as it is this day, to save much people alive.

English Standard Version

As for you, you meant evil against me, but God meant it for good, to bring it about that many people should be kept alive, as they are today.

New International Version

You intended to harm me, but God intended it for good to accomplish what is now being done, the saving of many lives.