2 If you buy a Hebrew slave, he shall serve you for six years. In the seventh year he is to be set free without having to pay anything.
3 If he was unmarried when he became your slave, he is not to take a wife with him when he leaves; but if he was married when he became your slave, he may take his wife with him.
4 If his master gave him a wife and she bore him sons or daughters, the woman and her children belong to the master, and the man shall leave by himself.
5 But if the slave declares that he loves his master, his wife, and his children and does not want to be set free,
6 then his master shall take him to the place of worship. There he is to make him stand against the door or the door-post and pierce his ear. Then he will be his slave for life.
7 “If a man sells his daughter as a slave, she is not to be set free, as male slaves are.
8 If she is sold to someone who intends to make her his wife, but he doesn't like her, then she is to be sold back to her father; her master cannot sell her to foreigners, because he has treated her unfairly.