You can not get pregnant by dry humping through clothes.
In order for sperm to get anywhere they need moisture and really quite a bit of it. So, is it conceivable that a sperm could make it through four layers of cloth, the folds of the vulva, the vagina, uterus, and fallopian tube to fertilize an egg (presuming there is an egg there to be fertilized)? No.
Two layers of cloth? No.
One layer soaked through because y’all have been having a grand time? Possibly. But it’s extremely unlikely.
What you’re also not going to have happen with clothes-on humping is you’re not going to transmit any of the STI’s that can go from skin to skin. Check out the rest of the site and The Talk for more information on the kinds of STI’s and how they can be transmitted.
Be well, and have fun!
In answer to the question: can you get pregnant if you dry hump your partner and have layers of clothing in between the genitals?
Dry humping (also: frottage) is hot, sexy, super safe fun!