How to Make a Permanent Magnet From Scratch

You can make a permanent magnet at home by aligning the internal magnetic structure of a ferromagnetic material, most commonly steel or iron. The simplest method requires nothing more than an existing magnet and a piece of steel, and takes just a few minutes. Stronger permanent magnets are manufactured industrially through a more complex process involving powdered rare-earth metals, but the underlying principle is the same: force the tiny magnetic regions inside the material to point in one direction.

Why Some Materials Can Become Magnets

Every electron acts as a microscopic magnet, spinning around an axis and generating a tiny magnetic field. In most materials, these fields cancel each other out, leaving the object magnetically neutral. In ferromagnetic materials like iron, nickel, cobalt, and certain alloys, electrons in neighboring atoms align with one another and form clusters called magnetic domains. Each domain already behaves like a small magnet, but in an unmagnetized piece of steel, these domains point in random directions, so their fields cancel overall.

Making a permanent magnet means forcing all those domains to line up in the same direction. Once aligned, the material has a distinct north and south pole, and it generates an external magnetic field strong enough to attract other ferromagnetic objects. The key is choosing a material that holds this alignment permanently rather than losing it as soon as the external influence is removed.

Choosing the Right Material

Not every metal will hold magnetism. Materials fall into two broad categories based on how stubbornly they retain domain alignment:

  • Hard magnetic materials resist losing their magnetism once aligned. These include hardened steel, alnico alloys (aluminum, nickel, cobalt), and rare-earth compounds like neodymium-iron-boron and samarium-cobalt. These are what permanent magnets are made from.
  • Soft magnetic materials magnetize easily but lose their magnetism just as easily. Pure iron and most iron-based alloys fall into this category. They work well as temporary magnets or electromagnet cores but won’t stay magnetized on their own.

For a DIY permanent magnet, a hardened steel needle, nail, or bar is your best bet. Stainless steel often won’t work because many stainless alloys aren’t ferromagnetic. A simple test: if a refrigerator magnet sticks to it, the material is ferromagnetic and worth trying.

The Stroking Method

The oldest and simplest technique uses an existing magnet to align the domains inside a steel bar or needle. There are two variations.

Single Touch

Place your steel bar on a flat surface. Take a strong magnet and stroke it along the full length of the bar, moving in one direction only. When you reach the end, lift the magnet high above the bar before returning to the starting position. This lifting step matters: dragging the magnet back across the surface would partially undo the alignment you just created. Repeat 30 to 50 times. With each pass, more domains rotate into alignment, and the bar’s magnetic field grows stronger.

The polarity follows a predictable rule. Whichever pole of the stroking magnet you use, the end of the bar where each stroke finishes will develop the opposite polarity. If you stroke with the north pole and finish at the right end, that right end becomes a south pole.

Divided Touch

This method produces a more evenly magnetized bar. You need two magnets. Place the steel bar on a surface and position the two magnets at its center, with opposite poles facing down (one north, one south). Simultaneously stroke outward from the center, one magnet moving left and the other moving right. Lift both magnets high, return to the center, and repeat. This approach magnetizes both halves of the bar at once and tends to produce a stronger, more uniform result than single touch.

The Electromagnetic Method

Wrapping a coil of insulated copper wire around your steel bar and running electric current through it creates a much stronger magnetizing field than hand stroking. This is how most DIY magnets with real holding power are made.

Wind 100 or more turns of insulated wire tightly around the steel bar, keeping the coils close together and moving in one direction. Connect the wire ends to a battery (a 9-volt or a few D cells in series work for small bars). Current flowing through the coil generates a magnetic field inside it, which forces the steel’s domains into alignment. Leave the current flowing for 30 seconds to a minute. More turns of wire and higher current both produce a stronger magnetizing field, but be careful: the wire will heat up, and a short circuit can drain or damage the battery quickly.

When you disconnect the battery, a hard steel bar will retain most of its new magnetism. A soft iron core will lose it almost immediately, which is why material choice matters so much.

How Industrial Magnets Are Made

The magnets you buy online or find inside headphones and hard drives are far stronger than anything the stroking method can produce. Modern rare-earth magnets, particularly neodymium-iron-boron types, are manufactured through a multi-step industrial process.

The raw alloy is melted in a vacuum furnace to prevent oxidation. Once cooled, the solid material is crushed into a coarse powder, then milled further under a nitrogen atmosphere until particle sizes drop below half a millimeter. This fine powder is placed in a mold and pressed while exposed to a strong external magnetic field, which pre-aligns the particles. The pressed block is then sintered (heated to just below its melting point) so the particles fuse into a dense solid. After sintering, the magnet is machined into its final shape, coated to prevent corrosion, and given a final pulse of magnetization in a powerful electromagnet.

The strongest commercially available grade, N52, produces a magnetic flux density of 1,430 to 1,480 millitesla and a maximum energy product roughly eight to ten times greater than older alnico magnets of comparable size. This is why a thumbnail-sized neodymium magnet can support several kilograms.

Testing Your Magnet’s Strength

The simplest test is seeing how many paperclips your new magnet can pick up in a chain, or how far away it can deflect a compass needle. For a rough comparison over time, count the paperclips each day to see if your magnet is losing strength.

For a more precise measurement, you can build a basic gaussmeter using a Hall effect sensor, a small voltage regulator, and a digital voltmeter, all powered by a 9-volt battery. The sensor outputs a voltage that shifts proportionally to the magnetic field passing through it. A reading of 2.5 volts represents zero field, with voltage rising or falling depending on which pole faces the sensor. The conversion rate for a typical sensor is about 1,300 gauss per volt. For context, a refrigerator magnet measures around 50 gauss at its surface, while a small neodymium magnet can exceed 3,000 gauss.

What Weakens a Permanent Magnet

Permanent magnets aren’t truly permanent. Several things can knock their domains back out of alignment.

Heat is the biggest threat. Every ferromagnetic material has a temperature threshold, called the Curie temperature, above which it completely loses its magnetism. For iron this is about 770°C (1,418°F), for cobalt roughly 1,115°C (2,039°F), and for nickel just 354°C (669°F). Neodymium magnets are more sensitive to heat than those numbers suggest. Most grades start losing strength above 80°C (176°F), well below any Curie point, because thermal energy begins randomizing domains long before total demagnetization occurs.

Physical shock is another common cause. Dropping a magnet on a hard floor or striking it with a hammer jolts the domains out of alignment. Repeated vibration over time has the same gradual effect. Exposure to strong alternating magnetic fields, like those near electric motors, welding equipment, or high-current wiring, can also partially demagnetize a permanent magnet. Even corrosion matters: rare-earth magnets absorb oxygen readily, and oxidation degrades the magnetic material from the surface inward.

Keeping Your Magnet Strong

Store magnets away from heat sources and electronics. A steel “keeper” (a small piece of soft iron bridging the north and south poles) helps maintain domain alignment during storage by providing a closed loop for the magnetic field. Keep different types of magnets separated: neodymium magnets held within two inches of weaker ceramic magnets can demagnetize the ceramic ones.

Handle strong magnets with respect. Neodymium magnets larger than a coin can pinch skin hard enough to cause blood blisters, and larger ones can crush fingers or shatter on impact, sending sharp fragments flying. Wear heavy work gloves when handling anything above a few pounds of pull force, and keep all strong magnets away from children. If swallowed, multiple magnets can attract each other through intestinal walls and cause serious internal injuries. Also keep them clear of credit cards, pacemakers, and any electronic device with magnetic storage.