18:25

חָלִלָה לְּךָ מֵעֲשֹׂת כַּדָּבָר הַזֶּה לְהָמִית צַדִּיק עִם־רָשָׁע וְהָיָה כַצַּדִּיק כָּרָשָׁע חָלִלָה לָּךְ הֲשֹׁפֵט כָּל־הָאָרֶץ לֹא יַעֲשֶׂה מִשְׁפָּט׃

Far be it from You to do such a thing, to put the righteous to death with the wicked, so that the righteous should be like the wicked. Far be it from You! Shall the Judge of all the earth not do justice?"

Bereshit 18:25

חָלִלָה לְּךָ מֵעֲשֹׂת

Bereshit / Genesis 18:25

חָלִלָה לְּךָ מֵעֲשֹׂת כַּדָּבָר הַזֶּה לְהָמִית צַדִּיק עִם־רָשָׁע וְהָיָה כַצַּדִּיק כָּרָשָׁע חָלִלָה לָּךְ הֲשֹׁפֵט כָּל־הָאָרֶץ לֹא יַעֲשֶׂה מִשְׁפָּט׃

Far be it from You to do such a thing, to put the righteous to death with the wicked, so that the righteous should be like the wicked. Far be it from You! Shall the Judge of all the earth not do justice?"

Pshat פְּשָׁט

Shall the Judge not do justice

Rashi: "chalilah" means "unworthy of You": people will say He sweeps everyone away, as in the Flood. The hei in "hashofet" (הֲשֹׁפֵט) makes the phrase a question of wonder. Sforno: if the whole earth were judged by its majority, it would have to be destroyed for ever, since most people are wicked. So the judgement of all the earth cannot go by majority alone.

How Rashi and Sforno explain it

Remez רֶמֶז

"Chalilah" twice

Lekach Tov: "chalilah" comes from "chulin" (חֻלִּין), "profane", and "chilul" (חִלּוּל), "desecration": such a deed would desecrate the Name of Heaven. The kaf of "kadavar" adds: neither this, nor anything like it, nor even less. Tanchuma Buber: the two "chalilah" are this world and the world to come: You do not set judgement aside in either.

How Midrash Lekach Tov and Midrash Tanchuma (Buber) explain it

Drash דְּרָשׁ

The wise woman of Avel

Tanchuma Buber: Avraham foresaw that one woman, Serach daughter of Asher, would save a whole city, Avel, from Yoav's army. She bargained with the townspeople from a hundred down to one, and they gave up one rebel. If Yoav spared a city for the head of one guilty man, will the Merciful One destroy them all? Tanchuma: Avraham went down from fifty to ten, for ten have the power to cancel the punishment.

How Midrash Tanchuma (Buber) and Midrash Tanchuma explain it

Sod סוֹד

Five hundred to one

Be'er Mayim Chaim: the measure of good is five hundred times greater than the measure of punishment. So the merit of the righteous covers the wicked, while the sin of the wicked does not drag down the righteous. Judgement goes by stages: first the country, then the city, then each person. And the righteous will not die with the wicked.

How Be'er Mayim Chaim explain it