Exodus 23:9

Do not oppress a foreign resident, since you yourselves know how it feels to be foreigners; for you were foreigners in the land of Egypt.
BSB · Berean Standard Bible
Also thou shalt not oppress a stranger: for ye know the heart of a stranger, seeing ye were strangers in the land of Egypt.

Note heart: Heb. soul

KJV · King James Version
“You shall not oppress an alien, for you know the heart of an alien, since you were aliens in the land of Egypt.
WEB · World English Bible
And a sojourner shalt thou not oppress: for ye know the heart of a sojourner, seeing ye were sojourners in the land of Egypt.
ASV · American Standard Version

Related passages

From the Treasury of Scripture Knowledge, grouped by the word they explain.

thou shalt not
Exodus 21:21; Deuteronomy 10:19; Deuteronomy 24:14–18; Deuteronomy 27:19; Psalm 94:6; Ezekiel 22:7
ye know
Matthew 18:33; Hebrews 2:17, 18