The Magnetic Gate Latch. DIY it in One Hour.

I DIYed myself some invisible gate latches 10 years ago and those invisible, magnetic gate latches are still working perfectly.  Here’s how to do your own.

Wood fence gate with horizontal boards surrounded by an arbour with climbing roses.

10 years ago I was looking for a discreet gate latch. All I could find were big, honking latches that looked like they belonged on the gate of a medieval castle. I do not live in a medieval castle or a country barn so I wasn’t too enamoured with the offerings.

I wanted sleek, discreet and cheap but I couldn’t find any of those options so I ended up making my own gate latches. 

For gate handles I used wood cupboard handles from Ikea because they hit all of those requirements. The only problem with using random objects as gate handles ( twigs, doorknobs, cupboard handles, suggestively positioned Barbie Dolls … to name a few), is they don’t have any latches.

Therefore, there’s no real way to keep your fence gate closed. Which is fine and dandy if you’re a “come on in” kindda person. I am not a “come on in” kindda person. I’m a “stay away” I’m in my p’jamas lipsynching to Beastie Boys in the backyard at 2 in the afternoon kind of person.

So how to deal with this dilemma? Rare Earth Magnets which are the strongest type of permanent magnet in the world. They are so strong the larger ones come with a warning because you can easily squish your fingers between them.

These have worked so well for me that I used them again for the doors of my modern chicken coop. 

You can get the same Rare Earth magnet sets I used here on Amazon or from Lee Valley Tools.

Installing a Magnetic Latch

You’ll need:


A Forstner drill bit will drill a cup with a flat bottom into wood.  Don’t worry if you don’t have this type of bit.  Neither did I.  I just ran out to my local hardware store and bought one but you can buy a kit with 8 sizes on Amazon for what I paid for one of them.

1" forstner drill bit laying on work bench.


The magnetic cup holds the magnet in place, while the washer is what is used opposite the magnet to attract it and hold the gate closed.

Magnet cup, Rare earth magnet and washer laid out on paint spattered work bench.


Installing a Rare Earth Magnet

Photographic grid showing steps to installing rare earth magnets into wood for making a magnetic gate latch.

  1. Cut the scraps of wood to the size you need depending on the width of your magnets. I cut my scraps to 5 inches long X 2 inches wide.  The depth of the wood is 5/8ths of an inch.
  2. Drill your cup hole over to one side of the piece of wood.  Not too close to the edge that it might splinter and break. – to make this easier mark the depth of your magnet cup onto the drill bit with a Sharpie.
  3. Drop the magnet cup into the hole and screw it in place.
  4. Slide your magnet into the cup being careful not to pinch your fingers.

REMINDER – Watch your fingers … these magnets are strong and they bite.

Now you have to head outside with your drill, your block of wood and your washer.  

1" washer to be used as striker for magnet held up by two fingers.

  5.  Screw the block of wood with the magnet on it to your fence (not the gate) aligning it with the top of your gate.


Side by side image of a magnetic latch on a fence seen from the front and the back.

 6. Now screw the washer to the actual gate.  Line it up so it aligns with the Rare Earth Magnet.  I actually set mine off to the side a bit, so only 3/4’s  of the washer is touching the magnet.  I did this because the magnets are so strong I couldn’t even open it with the magnets at full contact.

Washer screwed into top of fence gate to act as striker for rare earth magnet.

When the gate is closed, from the outside it’ll look like this. You’ll see the little block of wood.

Modern fence with horizontal boards, a simple handle and magnetic latch.

And from the other side it’ll look like this. Completely invisible.

Modern gate on fence with a simple black Ikea cupboard handle and square black hinges.

If you have an arbour, or some other weirdness with your fence, you may have to play around with this general technique to get it to work for you. For instance, on one gate in my backyard, I had to use a block of wood as opposed to a strip because of the way the structure was. No big whoop. Adapt and overcome.

Block of wood screwed into top of arbour to act as a striker for an invisible gate latch.

The basics are the same. Screw a cup hole into a block of wood as opposed to a strip of wood and attach that to your fence.

Rare earth magnet set into a block of wood screwed into fence.

Again, the reason for all of this (which seems like a lot of work but really isn’t) is so you don’t have to have ugly gate latches ruining your nice fence. Big hideous bolts and medieval looking handles that would imply a fair maiden lives here. 

As an added bonus, you can push your gate open and kick it closed with your foot if you’re carrying stuff and both your hands are full.

Photographic grid showing steps to installing rare earth magnets into wood for making a magnetic gate latch.

An Invisible Magnetic Gate Latch.

Active Time: 1 hour
Total Time: 1 hour
Estimated Cost: $25

Make a sleek gate by using modern cupboard handles and this almost invisible magnetic gate latch.


  • Rare Earth Magnets, magnet, cup and washer set. (I used a 1″ set)
  • Scraps of wood that match your fence.


  • Drill
  • Forstner Drill bit (in the same size of magnet you have)


  1. Cut the scraps of wood to the size you need depending on the width of your magnets. I cut my scraps to 5 inches long X 2 inches wide.  The depth of the wood is 5/8ths of an inch. This is to accommodate 1" magnets.
  2. Drill your cup hole. Place it towards the edge of the wood not in the centre. To make it easier to know how deep to drill, mark the depth of your magnet cup onto the drill bit with a Sharpie.
  3. Drop the magnet cup into the hole and screw it in place.
  4. Slide your magnet into the cup being careful not to pinch your fingers.
  5. Screw the block of wood with the magnet on it to your fence (not the gate) aligning it with the top of your gate.
  6. Now screw the washer to the actual gate.  Line it up so it aligns with the Rare Earth Magnet.  I actually set mine off to the side a bit, so only 3/4’s  of the washer is touching the magnet.  I did this because the magnets are so strong I couldn’t even open it with the magnets at full contact.
  7. Test the gate and if it holds, you're done!


Worried about the kids getting out?  Don’t.  It’ll do them some good to wander out into the big, bad world.  Builds character.  Plus it’ll give you a break for that half hour before you panic and realize they’re gone.

Oh, you like the kids??  O.K.  Sorry. You still don’t need to worry about the kids. The magnets are actually so strong that young kids can’t push or pull the gates open. Sometimes Betty has trouble pushing or pulling the gate open. Which is fine by me. She doesn’t need to see me dancing to Beastie Boys in my p’jamas.

 No one does.

→Follow me on Instagram where I often make a fool of myself← 

The Magnetic Gate Latch.  DIY it in One Hour.


  1. Joanne Nichols says:

    My current gate needs to be rebuilt. The current gate is extremely wide and that makes it too heavy. I was thinking of a gate that opens like French doors. Could I use the magnet closure with something like that. Since I have a pool, I need to have it lockable. Any suggestions?

  2. john says:

    Years ago i used earth magnets on the kitchen cabinets to keep the german shepard out of them but never thought of using it for a fence gate. Thanks that ugly auto locking latch with the pull cable is going in the trash!

  3. olivia says:

    you giuys make it seem so easy lol i couldnt do it i had to call the experts After moving into my new home in North Palm Beach, the last item on my list of projects was the fence. I got six different quotes and chose Fence Crafters not just because they were affordable but also I got a good vibe from them during the bids process. My gut feeling paid off. Their team completed my fence professionally, efficiently and affordably. I would highly recommend this company for any fence job, large or small.

  4. gladys says:

    Hi Karen,

    I got my contractor to do a similar thing to yours but it didn’t look anything close to yours from the back side. In fact, the way he did mine it looks like a wall and it is so unappealing. The front looks a bit similar to yours but on the back what he did was put a piece of wood diagonally on the back so you can grasp it and push the gate open. Completely pointless when I was going to install gate hardware with a latch. I wanted the back to look like the front but I didn’t get that. He also used the green pressure treated wood which is also so unappealing especially when you can now get brown pressure treated wood.
    Do you have a blog on how you made your gate? Thanks!

  5. Jana says:

    Hi Karen,
    I was wondering if you could give an update of how this has stood the test of time? I love the idea and wonder if it’s a good long-term solution?


    • Karen says:

      Hi Jana. I see you work for a website dedicated to gate hardware etc. Nice stuff. The rare earth magnets are many years old and still going strong. They’re perfect. No problems or issues at all. ~ karen!

      • Jana says:

        Hi Karen,
        Thanks for the quick reply! Yes, we have a gate hardware company where ugly stuff is not allowed! :) I’ve been referring people to your project for years when a ‘typical’ gate latch won’t work for their installation. I’m ready to try it here on a test gate! It’s such an elegant solution. Really glad to hear they’ve held up. I’m going to order some magnets in!


  6. Jason says:

    Awesome idea. Magnets are going to be my new thing. How strong is the magnet you used? I know you can get them from 5lbs to 100lbs

  7. steve magnant says:

    love the science of magnetism. admire” out of the box”. thinking. KUGW.

  8. whoah this weblog is wonderful i like reading your posts.
    Stay up the good work! You realize, many individuals are looking around for this info, you can aid them greatly.

  9. Cathy says:

    Thanks so much Karen. I even considered some of the modern grab bars that you would put in a shower! It seems there are so few contemporary/modern styles to choose from – most of the gate hardware I have found has that medieval look!

  10. Cathy says:

    Where did you find the black door pull? I like that solid square look. I’ve looked so many places trying to find something that size and shape.

    • Karen says:

      Hi Cathy. The key to any successful search for a gate handle is NOT looking in the gate hardware aisle of the hardware store, lol. These particular pulls are cabinet handles from Ikea. They’re wood. I don’t think they carry these exact ones anymore but might have similar. Also try Lee Valley. ~ karen!

  11. Bob Garber says:

    Karen… as on option, one could put the block of wood with the magnets on the inside attached to the gate. It would work the same, but the block would swing away from you as the gate opened. I can see why you chose to mount it on the outside… so that it would look clean from the inside. I’m in a condo, so I don’t have that option… but thank you for the solution.

  12. Daniel Leikvold says:

    I’m in a wheelchair and have been looking for an easy gate latch. This seems perfect

    Like Garrett above I’m worried about rust and corrosion. I read elsewhere that rare earth magnets shouldn’t be used outdoors. But if you’ve had yours up for 4+ years…


    • Karen says:

      Hi Daniel – There’s absolutely no rust or corrosion. None! The only thing you have to worry about is the magnets being too strong. I eventually had to off set mine a bit because it was WAY too hard to open the gate. Good luck! ~ karen!

  13. garrett says:


    i am looking to do the same with newly installed gates, but was wondering if you have had any rust issues with the magnets being exposed to the elements?

  14. Ben says:

    How do you keep the attractor washer from pulling the magnet out the cup? It seems like the strength of the connection to the cup would be no different than the strength of connection to the attractor. Thanks, and great idea!

  15. John says:

    I’ve been thinking about doing this with the bedroom doors in my apt. none of them have locks anyway. The hardware on the latches is really old and cool, but also old and not working very well. I’m thinking I’ll just tape down the latch and use magnets.

    Is there any reason you put the magnet towards the top of the gate? I would have put it closer to the handle to avoid stressing the door as it gets older.

    either way, really great!

    • Karen says:

      Hi John – Yes, the reason the magnets are where they are is it was the only place to attach them on the gates. It’s difficult to describe why, but that’s the reason. :) ~ karen

  16. todd says:

    Can i please ask you what kind of wood did you use for the slats on the fence and gate and what are the dimensions…..i am currently starting my own diy fence project…thank you in advance

    • Karen says:

      Todd – The wood is pressure treated wood which probably makes it spruce, pine or fir (but pressure treated). It’s basic fencing lumber that’s 6″ x 1″ (that therefore actually measures 5 1/4″ x 1/2″. Good luck. ~ karen!

  17. John says:

    What magnet pull rating do you recommend, which would allow children to open it, but not dogs wandering the streets? Here in the UK I can get magnets rated at around 10 pounds, 20 pounds, 40 pounds.

  18. bilby says:

    Love your blog. Found it searching for a solution to adding a latch to a metal gate on our front porch. I have a bunch of pre drilled rare earth magnets and am always looking for a way to use them. They are one half inch which will be perfect for our little front porch gate. Thanks for the great solution.

    • Karen says:

      You’re welcome Bilby. Mine are still going strong after several years. I was a bit worried about the fence posts etc. shifting, but it’s worked out perfectly. ~ karen!

  19. Marisa says:

    Thank you so much for posting this!! We just put up a fence and could not find a latch we liked or that was going to keep the fence looking how we wanted so we are trying this! I will post pics on my pintrest when we are done@

    • Karen says:

      Hi Marisa – Yup … that’s why I came up with the idea. Latches seem to be fantastically ugly nowadays. :) Good luck. It works great! ~ karen

  20. Rondina says:

    Since I fell in love with your fence at first sight, I really enjoyed this post. Horizontal fences are kind of the new trend here, but most people won’t take the time or spend the money. You are right about how everyone talks about them. I’m reading this two years after you posted it, but I have some comments. I’m going to use this method for my back gate. The magnets are so strong, I doubt I will need a lock anymore. Do you see where your 4×4 posts are? I’m going to saw down a 6×6 to the same size as a 4×6. This will be the post for the latch side. I’ll drill the hole in the post, but I’ll put it in the middle. I understand why you put it on the top. The gate and posts were already there, but it is less likely to pull the gate to pieces if it was located in the middle. Preferably in a cross or side frame board. I can just see some robber trying to figure out how to open the gate. Not happening.

    • Karen says:

      Rondina – Yup, the middle will be fine. You may find you have to offset the magnet by a little bit. These magnets are s t r o n g. I’ve offset mine slightly, otherwise I’d never be able to get the gate open! At the very least I’d break the handle trying. ~ karen

  21. steve says:

    I look forward to receiving your emails every morning. WOW!



  22. steve says:

    Karen – has this thread died?



  23. Steve says:

    I have ordered my magnets for my fence gate and hope to have them installed this weekend. Where have you been lately. Why no posts?



    • Karen says:

      Hi Steve – Um … I’m not sure what you’re talking about. I’ve been posting every day for the past 2 years. (excluding Sundays) If you subscribe to my site it’s possible you were accidentally unsubscribed by my Subscription provider. It’s been known to happen. If you just take a look at my blog every day you’ll see a new post there bright and early in the morning. :) ~ karen!

      • Steve says:

        Karen, I am happy to see you are still at it. Anyway, I have read some of your bio information and find you to be a very interesting person. Is that you in the pic holding the big fish? WOW Weee.

        I am sort of like you in that I am the everyday unsung MyGiver. I can and do ponder situations until I come up with a solution.

        What TV shows will I be able to view you on soon?



  24. mila says:

    Karen, I’m trying to be a copycat, but you’re tricky. I bought a 1″ magnet set from Lee Valley, then bought a 1″ Forstner bit. Well, the magnet cup is bigger than 1″…it’s like 1 1/8″, so the cup doesn’t fit in the hole, dangit. should I just hammer it in and force it? or buy a bigger bit? do tell. This would be a considered a BIG carpentry job for me…help!!!

  25. trinity says:

    I just found your blog and am enthralled, and can’t leave my laptop. Everyone else is so boring now. And you should see my gates. Horrors. The handles are pieces of paint sticks wired up to the everyday latches. I don’t have a shred of creativity…..

  26. Roseann Houseman says:

    I just found your blog – clicking on links in the Design Sponge blog – and I LOVE this idea. I live in Houston and when I had my cedar fence built last summer it was a usual wet summer… this year we have a drought and the wood has shrunk enough that the latch hardware on the side gate doesn’t line up well and it’s hard to open an close. This would absolutely address this problem!!! BUT when I read Christine’s post about using the magnets to keep a gate open – WOW, thanks Christine! I have a big double gate in front of the driveway, and right now I use bricks to keep the two gate doors open while I am backing out or driving in… if it’s windy, the gates sometimes fly closed while I’m driving, so Christine’s adaption of your great idea will possibly save me a crushed bumper/mashed gate. Thanks to you both!

    • Karen says:

      You’re very welcome Rosanne! My magnets are up to yr 4 now with no problems at all. Love them! I’m happy you found my site. – karen!

  27. Kansas A says:

    Well this is the greatest idea since sliced bread! I’m wanting to build a screen door and don’t want the typical latch crap stuff that gives out after one summer and the magnets would be perfect! Thanks! :)

    • Karen says:

      Kansas A – This magnet may actually be too strong for a screen door. This is the 1″ rare earth magnet. I’d recommend a smaller size. It’d do the job just fine! Maybe a half inch. ~ karen

  28. Ellen says:

    I’ll repeat what others have said… you are BRILLIANT! Found your blog while googling contemporary gate hardware. Love this idea. Just convinced my husband to use this method. Our carpenters will start the gate tomorrow. We’ll put an overlap on the side as a gate stop and put the magnet on it. Now I just have to find the perfect handle. Thanks!!!!!!

    • Karen says:

      Ellen – You’re welcome! I’m just finishing up building a chicken coop and am using the Rare Earth magnets on it as well. ~ karen!

  29. Gina says:

    I was thinking of this idea also so I googled it and found this page. I have idiots for tenants and they have left the gate open several times and my dogs have escaped…
    I am at my wits end ready to kick them out. I have a PVC gate with a locking latch; it does not close properly at times. How can I set this up using the magnet? Cut a hole into the pvc fence?

  30. Sheri says:

    Thank you thank you thank you!! I ordered my magnet for my gate today. I also have some sort of aversion to being able to see the latch hardware from the outside. So it has been latch-less until you have now proposed the perfect invisible closure solution! Being obsessed with invisible yet functional things, and the sleekness of hidden design, so I am thrilled to see this idea. My two year old will be enlisted to test its strength as soon as the magnets arrive.

    • Karen says:

      Sheri – You can adjust the strength of the magnet’s “hold” by how you align the magnet to the washer. If they hit head on it’ll be strongest, but if you only have half the washer hit the magnet it’ll be less strong, therefore easier to open. :) ~ karen

  31. Jana says:

    This is a really great idea and I’m going to recommend it to customers who need a different kind of gate latching solution. Thank you!

  32. Christine says:

    I am also in LOVE with your blog, I never have seen anything like it.
    After reading this post I ordered some magnets back in September and have been holding onto them. I just got to used them, not as a latch but as a way to hold the gate while it is open. It works great and I impressed my hubby and dad at the same time!

  33. Haywood says:

    I found the magnet cup holders specifically for the rare earth magnets at Hartville Tool and Woodcraft. Amazing Magnets also sells an inexpensive, one-piece counterbored magnet cup assembly.

  34. Haywood says:

    Do you have a source for the cup washer for the magnet?

    I have looked online and at several local hardware stores, with both large stock and more specialty fasteners. No one stocks a simple metal cup or can at least find one.

  35. Kate says:

    I just found your blog and am in L-O-V-E. We’re about to fence in our new yard, so quick question, did you build the fence you have pictured? if so do you have a tutorial online of how you did it?
    Thanks and looking forward to following you now.

    • Karen says:

      HI Kate! No I didn’t build the fence … I designed it. I can answer whatever questions you might have re: the design. I’m not sure it will be of any help but here is a post I did on re-doing my entire backyard in case you didn’t see it and plan to do your own. Good luck with the fence! – karen

  36. Mary says:

    Those magnets are great! I’ve used them to attach the wood for a roman blind on a metal door. Just found your blog – it has great ideas. Love that your fence is different. And great to have different handles.

  37. Janice Willinger says:

    Thanks; I’ll look. I’ve certainly garnered some strange looks at the name, but I love it! He even looks like the Vertus Heirloom turnip (I looked that up on Google)–only 16 pounds, but rather long with bedroom eyes and freakishly large ears. I call him my little root vegetable! Love reading you every day…

  38. Janice Willinger says:

    Very way cool…but I need advice beyond (or maybe before?) the latch. I just rescued my first-ever dog and I need to build a fence from scratch (actually, I need to hire someone to build said fence). I’d love to avoid the typical-looking fence and put in something that matches my contemporary home. Any ideas of where to look for ideas? Turnip needs a place to run! Thanks :)

    • Karen says:

      Is “Turnip” seriously the name of your dog??? I L-O-V-E that! When looking for ideas for my fence I googled contemporary fence in images and found a few things. A lot of the images however, used exotic woods (which I can’t afford) or very think pieces of wood, run horizontally. The problem with this is the narrower the piece of wood, the more likely it is to warp and bend. So beware of that when you’re deciding on a design. I also drove around neighbourhoods where I knew there were contemporary homes! I found a few nice fences this way! Good luck.

  39. Pam'a says:

    Rare earth magnets are really, really strong, like Karen already said… They come with warnings like, “Once you set it, you won’t be able to remove it from its holder again.” They mean it.

    Further, be very careful where you leave them laying around. They can suck the data off magnetic media, or mess up the delicate workings inside a watch. They should be kept well away from anyone with a pacemaker or other internal metal device.

    Etc. Etc. These are NOT your cute little gradeschool magnets.

  40. Ericka says:

    Ok that is freakin genius! I would have never, ever thought about that! You are so freakin’ awesome! Inspiration abounds here! Thanks!

  41. ModFruGal says:

    Nice! I had a hunch magnets might be involved somehow…and I LOVE the application. Mod and chic!

  42. Evalyn says:

    Brilliant! I would have to put mine on the bottom of the gate, the better to keep my dog from pushing it open.

    • Karen says:

      Evelyn. If you pit it on the bottom you’re bound to remove skin from your shin or ankles every rime you go through the gate! And don’t worry … A human can barely open this gate so unless you own an exceptionally large St. Bernard you’d be O.K. ! – Karen!

  43. sera says:

    now I just need my very own backyard to enclose…

  44. Super awesome. Just another reason I wish we had a “normal” backyard, which could be easily fenced.

  45. Lin N says:

    Yep….freaking brilliant! When next I have a fence I know what I’ll do to close the gate. Thanx

  46. Chris Graham says:

    I feel a tremendous sense of shame. I feel I have a fairly evolved sense of modern style, and my home reflects as much. But I have put up with ugly ordinary latches and hardware on my gates. Blissfully unaware that there was anything I could do about it. My eyes have been opened, um thanks… Except now I fear I cannot, in good design conscience, live with my ordinary ugly gate hardware and my to-do list has grown. Niicely done, Karen!

  47. Zina says:

    What a great idea! Tres chic.

    If you’re designing the fence AND figuring out the hardware at the same time instead of back-engineering, it’d be easy enough to design your gate so there’s an overlap at the opening (assuming the gate opening only on one side of the fence so that you don’t have anything marring the line of your fence. I like the idea of putting it on the side of the gate and post!

  48. mila says:

    i know i’m not the 1st to say this, and certainly will not be the last, but you are truly brilliant.

  49. Rebecca says:

    Brilliant! Could you make it completely invisible by putting the magnet on the edge of the door? In some cases that might work. You don’t wanna walk too close to those holding your bank card though, do ya?

    • Karen says:

      Hi Rebecca! I considered putting the magnets on the inside of the post and the edge of the gate, but for the magnets to work they have to be touching. All gates have to be given space between the actual gate and post to allow for swing and swelling from dampness and humidity. Therefore magnets on the inside don’t work. – Karen!

      • Kelly says:

        Karen this is brilliant! I am currently coming up with ideas for a very contemporary wood gate and much different from our neighbours very traditional gate. I cannot afford the $500-$900 for contemporary pulls so am using an exterior door handle but the latch is the hurdle. Thank you for sharing as some how I am going to make this work! :

        • Karen says:

          Hi Kelly! Oh it’ll work. You’ll figure it out. My gate rare earth magnets are now years old and they’re still working absolutely perfectly! ~ karen

Leave a Reply

Your email address will not be published. Required fields are marked *

  • Seed Starting Calculator

  • About Karen

Skip to Instructions