Exodus 21:4

2 If thou buy an Hebrew servant, six years he shall serve: and in the seventh he shall go out free for nothing.

3 If he came in by himself, he shall go out by himself: if he were married, then his wife shall go out with him.

If his master have given him a wife, and she have born him sons or daughters; the wife and her children shall be her master’s, and he shall go out by himself.

5 And if the servant shall plainly say, I love my master, my wife, and my children; I will not go out free:

6 Then his master shall bring him unto the judges; he shall also bring him to the door, or unto the door post; and his master shall bore his ear through with an aul; and he shall serve him for ever.

This was said to Israel at a particular time, so it is wise to read it together with the surrounding text. Do read the surrounding verses too, because the context often says more than a single verse.

Compare

BSB
If his master gives him a wife and she bears him sons or daughters, the woman and her children shall belong to her master, and only the man shall go free.
KJV
If his master have given him a wife, and she have born him sons or daughters; the wife and her children shall be her master’s, and he shall go out by himself.
WEB
If his master gives him a wife and she bears him sons or daughters, the wife and her children shall be her master’s, and he shall go out by himself.
ASV
If his master give him a wife and she bear him sons or daughters; the wife and her children shall be her master`s, and he shall go out by himself.
DARBY
If his master have given him a wife, and she have borne him sons or daughters, the wife and her children shall be her master's, and he shall go out alone.
BLB
If his lord gives to him a wife, and she bears to him sons or daughters, the wife and her children shall be unto her lord, and he shall go out by himself.
ÅB
Dersom hans herre gir ham en hustru, og hun føder ham sønner eller døtre, da skal hustruen og barna høre hennes herre til, og han skal gå enslig bort.
OTB
Hvis hans herre gir ham en kone og hun føder ham sønner eller døtre, skal konen og hennes barn tilhøre hennes herre, og han skal dra alene.
B1930
Dersom hans herre gir ham en hustru, og hun føder ham sønner eller døtre, da skal hustruen og barna høre hennes herre til, og han skal gå enslig bort.

Study notes (Tyndale)

Original text and word study