Source: https://acousticguitar.com/how-to-clean-a-guitar-fretboard-the-proper-and-safe-way/
When I encounter disturbing amounts of grime and dirt on a fretboard, I generally begin by carefully scraping to remove as much as I can mechanically. This can leave scratch marks on a fretboard, so use a safe tool—one easy and very effective option is simply a popsicle stick with the end cut to a clean, square face. Using this stick like a chisel, you can remove quite a lot of gunk from a fretboard without much risk of scarring the underlying wood.
I follow with a silicone-free guitar cleaner such as Dunlop Formula No. 65 or Stew-Mac guitar polish. These are helpful in softening and loosening up remaining dirt so it can be scrubbed off. It can be hard getting into the tiny little corners next to the frets. For this, one of my best tools is just an old toothbrush. If necessary, you can trim the bristles a bit to make them shorter and stiffer for particularly tough areas.
In cases where the fretboard needs a lot of cleaning, the frets themselves are also frequently tarnished and in need of polishing. This is a common area where people inadvertently do minor damage—not just players but also many well-meaning guitar techs.
Historically, the best material for polishing frets has been 0000 steel wool, which is inexpensive, easy to find, and leaves a beautiful shining surface on the frets. The softness of the pad also conforms perfectly to the rounded fret tops and leaves no corners or flat spots. However, steel wool has a few big downsides. It sheds tiny particles of steel when used, which can float in the air and be inhaled. These particles will also quickly and tenaciously cling to any nearby magnet (such as a pickup); some pickups are susceptible to interference and even damage from accumulated steel wool particles. Finally—and most important for this question—polishing frets with steel wool invariably leaves a pattern of fine cross-grain scratches in the fretboard wood. You might not see the scratches in all light conditions, but they are painfully obvious once you know what to look for.
If you are using steel wool to clean your frets, I very strongly recommend masking the fretboard. This can be done with tape, which is a time-consuming process that many techs still find worthwhile, or with the one-at-a-time fret masking tools sold by many of the luthier supply companies. If you don’t want to invest in those, you can approximate them for occasional use by simply cutting a fret-sized slot in a piece of thin, resilient plastic. However, for many of the reasons above, I have gravitated away from steel wool in recent years, choosing instead to use a combination of green and gray nonwoven abrasive pads such as Scotch-Brite, fine sandpaper on a concave backing tool, and (of all things!) the foam-backed abrasive blocks marketed for polishing fingernails. This last item is my current favorite—inexpensive and versatile. Many of these blocks have four different grits around their perimeter, which permits quick and very nice fret polishing. (Again, mask your fretboard!)
The final stage in a typical fretboard makeover is oiling, and even this seemingly harmless task can be overdone. Oiling a fretboard is fun; it makes the wood look dark, rich and shiny, and gives the whole guitar a vibe upgrade. It also feels smooth and slick under the fingers, whispering promises of fast runs and effortless action. For these understandable reasons, it’s not uncommon for people to go overboard with oiling, by using too much and doing it too often. On brand-new instruments with kiln-dried fretboards, I put just enough oil on a soft cloth to leave a consistent color when wiped on the fretboard, but no more.
Well-loved instruments already have quite a bit of natural oil worked into the wood, so not much more is needed. Many times, I’ve seen people soak a rag with lemon oil and lather on a thick-drippy layer of oil, most of which needs to be wiped off afterwards. In addition to being a waste, this does very little to help the fretboard resist seasonal humidity changes, and it can have other unwanted side effects. Over-oiling the fretboard can cause loose frets by wicking under the fretwire and into the slots, even if the frets are glued in place. As with solvents, oils can also creep under inlays and put those at risk of coming loose. Excess oil on the fretboard will end up on your strings, shortening their lifespan and dulling the sound prematurely. And finally, it just makes a mess. Apply oil lightly and sparingly.
Cleaning and maintaining your fretboard can be fun and satisfying and is most easily done when changing strings, which many people do on their own. (This is one reason why I encourage people not to change their strings one at a time—that makes it nearly impossible to clean your fretboard during the string change!) I encourage you to give fretboard cleaning a try for yourself. Just keep the above recommendations in mind, to hopefully help keep the guitar off the repair bench a little longer!