Exodus 13:12

12 you shall set apart to the Lord all that first opens the womb. All the firstborn of your livestock that are males shall be the Lord's.

Exodus 13:12 In-Context

10 You shall keep this ordinance at its proper time from year to year.
11 "When the Lord has brought you into the land of the Canaanites, as he swore to you and your ancestors, and has given it to you,
12 you shall set apart to the Lord all that first opens the womb. All the firstborn of your livestock that are males shall be the Lord's.
13 But every firstborn donkey you shall redeem with a sheep; if you do not redeem it, you must break its neck. Every firstborn male among your children you shall redeem.
14 When in the future your child asks you, "What does this mean?' you shall answer, "By strength of hand the Lord brought us out of Egypt, from the house of slavery.
New Revised Standard Version Bible, copyright 1989, Division of Christian Education of the National Council of the Churches of Christ in the United States of America. Used by permission. All rights reserved.