How to Lubricate a Lock Using Graphite From a Pencil




About: I've built some weird stuff over the years, but most of that stuff has remained unseen by the world outside of me and a few friends. But then one day, one of these friends, he says to me, "Hey Jack, you sho...

Powdered graphite is the traditional material for lubricating pin tumbler locks. You can even buy powdered graphite that comes in a little tube with a thin nozzle specially designed for squirting the graphite powder into the keyway. Also you can buy powdered graphite in an aerosol spray, again a product intended specifically for lubricating locks. You just stick the plastic hose in the keyway and press the squirt button. What could be easier than that?

Well, this instructable assumes for some reason you don't have access to any of these modern conveniences like graphite-in-a-spray-can, and the only graphite you happen to have with you is in pencil-form.

Items needed for this instructable:
a lock that you own, or have permission to use
a key that opens that lock
a pencil (containing graphite)

Step 1: Separate the Graphite From the Pencil Somehow.

If the pencil you've got is one of the mechanical variety, getting the graphite, also called "lead", out of it will be easy. Maybe too easy.

If the pencil is one of the old fashioned wooden types, then removing the graphite takes a little more work.

I recommend using a sharp knife. Use the knife to whittle away the wood surrounding the graphite. I realize I didn't explicitly mention a knife in the "stuff you will need" section, but then I just naturally assumed you'd have some kind of cutting tool with you. Most civilized people do. What happened? Did those goons at the airport "confiscate" it? Well, uh, if you don't have a knife, I suppose you can use your teeth or a sharp rock, or something.

Anyway, keep whittling until you have a good sized chunk of graphite. How much? I dunno. You want a good-sized chunk? Maybe an inch, maybe 2 cm? That's l. r = 1 mm. Volume of the chunk is pi*r2*l = approximately 60 microliters.

Those of you using the little sticks for a 0.5 mm mechanical pencil will have to adjust the recipe a little to get the same volume of graphite. You know, use your algebra skills: find the new l based on a new r. I'll leave that as an exercise for the reader.

Of course, all you really need is a good-sized chunk.

Also try to make sure this chunk of graphite is free of little pieces of wood sticking to it. You want to put graphite in the lock, not wood.

Now at this point you might be worried because the graphite is in chunk form, not powdered, but I assure you there is no need to be worried. The powdering action happens in the next few steps.

Step 2: Stick It in the Hole.

Next stick that chunk of graphite into the keyway of the lock. That word "keyway", that's some technical jargon meaning the place where the key goes.

It may be the case that the chunk of graphite is too big to slide in easily, but don't let that deter you, just force it in there anyway. A twisting motion may help. The point is to get the graphite into the lock. It doesn't matter if the graphite goes in in one piece or not because this graphite is destined to get ground into powder anyway.

Step 3: Put the Key In. Slide It in and Out.

Put the key in. Slide it in and out.

The purpose of this step is to grind big chunks of graphite into fine powdered graphite.

Every so often try turning the key to see if the cylinder will turn. That is to say, the cylinder turning when you turn the key is what you expect to happen for a working lock when it "unlocks", as they say.

If the key meets resistance when you try to turn it, this doesn't mean you've broken your lock. It just means there are some big chucks of graphite that still need to be ground. Just keep jiggling that key around until the graphite is all ground up, er... down, into a fine powder.

Step 4: Repeat If Desired.

Now that old lock should be all lubed up with graphite, and the mechanism should be silky smooth.

If it still isn't, then... uh... I dunno? Maybe you need more graphite. If so then repeat steps 1 through 3. It's sort of like they say on shampoo bottles, "Repeat if desired."



    • Arduino Contest 2019

      Arduino Contest 2019
    • Party Challenge

      Party Challenge
    • Woodworking Contest

      Woodworking Contest

    32 Discussions


    2 years ago

    Not a good idea - Pencil lead contains graphite and wax. The wax content varies. A low wax pencil drafting or art pencil leaves a trail of graphite dust that would become smudges all over the page if the page were not pre-dusted with a compound to bind the graphite that is periodically swept off with a horsehair brush and the sheet is re-dusted for further use. If you don't have to do that with your pencil it contains a lot of wax to keep the pencil from leaving a trail of graphite dust. Over time the wax will oxidize and clump and cause the lock cylinder pins to become stuck. Don't bother saying your lock still works 2 months or 2 years after lubricating it with powdered pencil lead. It will not last.

    Pure powdered graphite lubricant is about $1, although you can pay 5x that at the wrong retail outlet. There's no money saved powdering an expensive drafting lead, or an artist's shading pencil. The long term cost of using powdered lead from a school or office pencil is a new lock is repair or replacement. Save yourself the disappointment of a success that turns sour, buy pure graphite lubricant.


    2 years ago

    Fantastic tutorial! I have a Sentry safe with a sticky lock and a little graphite sorted out the problem straight away. Thanks a lot!


    2 years ago


    this was very helpful. I had to repeat the process twice on both sided of the lock but it was worth it. thumbs up.


    2 years ago

    I laid the key on a paper towel, then got a pencil and a nail file. Filed the pencil so it sprinkled graphite onto the key. Very carefully inserted key into lock without spilling graphite. Did this a few times, using both sides of the key. VOILA!

    1 reply
    Jack A LopezSuzanC1

    Reply 2 years ago

    That sounds like a good method. Thanks for commenting. I am glad to hear it worked.


    3 years ago

    I tried crushing two pieces of lead from a mechanical pencil and now the key slides in easily, but I can't turn the lock at all! I assume a piece of lead is now stuck. How do I clean out the inside of the lock?

    1 reply
    Jack A LopezElizabethL63

    Reply 3 years ago

    I am guessing more of Step 3 is needed; i.e. slide the key in and out of the lock, in an attempt to grind up a tiny piece of pencil lead that is sticking somewhere.

    I hope you're not locked out of somewhere you really need to get into, like your house, or if that is the case, I hope you left another door, or a window, open somewhere.

    Anyway, I humbly suggest several more iterations of Step 3, and I am hopeful this will work. That graphite chunk will get ground into dust, and your lock will open again.

    I'm not sure what to try next, if Step 3 fails.

    Maybe remove the lock from the door, then hold it keyway facing down, and shake it to try to get the pieces of pencil lead to fall out?

    Completely taking apart the lock is probably the last resort. That kind of endeavor requires you know a lot about locks, including how to pick them; i.e. open them without the key.

    Either that or it requires the attention of someone who does know all this, and also has the necessary tools. You know: a locksmith.


    11 years ago on Introduction

    Good instructable. : ) Im a locksmith and I can say that this will work for a lot of locks. If you do not have success, you should use a spray lubricant like Tri-Flo. Nothing with silicone, it will eventually gum up the lock, so no WD-40. Keep in mind, if your pieces are too big to start, it will be hard to force the key to break them up. By the way, just because I am a locksmith and understand that this will work doesnt mean I offer any warranty to anyone who tries this. Level of success will depend on the person performing the task to some degree.

    7 replies

    Reply 9 years ago on Introduction

    Good to know - thanks.  I don't think that label used to be there, although I have not read the ingredients on WD40 in many years.  However, it is still not preferred for locks by many locksmiths including myself.  In a totally dry environment, I will use graphite and everywhere else I prefer Tri-Flo.


    Reply 7 years ago on Introduction

    Believe it or not the active ingredient in WD 40 is fish oil. WD stands for Water Displacement, so that's why it helps prevent rust. It will also dissolve gummed-up oil. I happen to like Tri-Flo and Corrosion-X as well.

    The thing about graphite is it was first used when locks had large sliding parts with lots of clearance-unlike lock cylinders, which are fairly tightly miked. It would be OK if you only used it ONCE, but I've seen cylinders so packed with graphite the pins wouldn't move (I've been a locksmith for about 30 years).

    What I like about the ultra lightweight spray oils (NOT silicone or PBlaster penetrant-though they do make a lubricant as well) is they tend to prevent freezing in low temperatures and will loosen up gummy locks. Finally, WD40 is available nearly everwhere and you can't overuse it...although you'll pull out graphite on the key if there's some already in the lock, so watch your hands and clothes.

    Some high-security locks like Medeco are so tightly miked you can ONLY use something like WD40, or they'll jam up quick!


    Reply 3 years ago

    No it's not 'fish oil' That's urban legend.


    Reply 3 years ago

    Seems you're right. Can't remember where I read that.

    i use WD-40 for my bike locks because they alway stay outside and as i recall wd-40 also prevents rust. does it really prevents rust and if not does graphite?


    Reply 11 years ago on Introduction

    One more thing, dont lock yourself out. Always do something like this with the door open, not just unlocked, open. If you goof it up you can still get in and out.


    I was reading your comment author, and I noticed that you said that burning the pencil would burn off the wood leaving just a hot graphite core?? Today I was burning a pencile of mine, it was ( HB 2 ) and I just noticed that after alittle while, the pen started to make popping sounds, and I saw the pencile cracking opened, and after it cooled down, everything was burned, as if the core was wood too?! Is there a special type that burns or that graphite do burn under some situations..?

    1 reply

    Actually, I've noticed that too. For some kinds of wooden pencils, the graphite inside of them does not withstand fire very well. This kind of graphite cracks apart, making popping noises as it does this. So that kind of pencil graphite is not very good refractory, since it breaks apart when heated in a flame.

    However there are some wooden pencils with a graphite rod inside that will stand up to flame. For example, that burning pencil I took a picture of, had a good refractory piece of graphite in it. That graphite rod would just glow orange while the outer wood casing burned into ash.

    I don't know how to tell which pencils have the good graphite, and which ones have the crappy graphite that breaks apart with little popping noises. I mean how to tell prior to lighting them on fire.

    Actually there is no realistic expectation that any pencil should have good refractory graphite. I mean they make them for writing with, not for lighting on fire. Also the graphite in pencils is not pure graphite. The Wikipedia article for "Pencil"
    says "pencil cores are made of graphite mixed with a clay binder"

    However, good, refractory, graphite will stand up to fire. I know this because I have seen crucibles made of graphite.

    By the way, if you are looking for similar things, I think the "carbon" electrodes found in zinc-carbon batteries, are some kind of graphite, since they are made to conduct electricity.

    If I get around to it, I'll try pulling one of those rods out of a zinc-carbon AA battery, and putting it in a propane torch flame, to see if it can be heated to glowing orange hot, without burning. If successful, hopefully I can also get a picture of this.

    Also leads sold for mechanical pencils *might* be better quality than that found in wood cased pencils, maybe better able to withstand fire without cracking up. I dunno. Again, some experimentation is required.


    5 years ago on Introduction

    I hate to tell you this but the locksmith that commented is probably rubbing his hands together with glee. I used to work with a locksmith. He LOVED people that used graphite on their locks because he charged them $65 to go to their place and spray WD-40 into the lock, jig it with the key, spray, jig, spray, jig until it cleaned the graphite out. EASY $65. Please don't use graphite. WD-40 is the best. It also helps keep the lock from freezing up in below freezing weather. If water gets into the keyhole, it keeps it out. Sorry, Locksmith guys/girls. I'm snitching you off!

    1 reply
    Jack A Lopez

    Reply 6 years ago on Introduction

    I have locked myself out of a car, by way of locking the keys in the car, on more than one occasion. 

    One solution to this problem, is for me to carry a duplicate of the key needed to unlock the car somewhere on my person.  For example I put another key to the car door in a pocket in my wallet. When I'm out driving somewhere, almost always I'll have my wallet with me, in my pants pocket, on my person. 

    Then when I lock the keys in the car, I can just unlock it via the spare key in my wallet.

    But this trick might require some adaptation for a woman to do it, and the reason for that of course is that women have clothing and accessories that are different than those men have.  Women's clothes often lack pockets, and women carry their money and car-keys in little bags called "purses".  Or at least this is the way it is for the clothing styles and customs in my home country, the Former U.S.

    I found an instructable is related to that topic:
    But it only offers hints and suggestions. Or maybe it is not intended to be taken seriously at all.  Although I  tend to think the desire of women to find, and/or make, clothing with more pockets is very sincere.

    Of course the car itself is neither male nor female, and is thus not bound by the same fashion rules.  The car is of robot gender, and robots are people too, sort of.  So you might consider the putting a pocket on the car

    The usual trick is a key in a little box held on by strong magnets to some inconspicuous part of the car.


    7 years ago on Introduction

    Would toner from a laser printer work? I think that's graphite too.