GreatLight CNC Machining Factory logo
CNC Machining
Rapid Prototyping
Materials
Industries
News
About GL

Get Instant Quote

Magnesium Machining Guide

CNC machining magnesium: key tips for safe, accurate parts

Magnesium cuts fast and leaves a fine finish, but the chip is the hazard. This guide is for engineers and buyers who need to know how to run AZ31B and AZ91D without a fire, which tool geometry works, and when magnesium is the wrong choice. Read it and you can write a process sheet for your shop or judge a supplier's.

AZ31B / AZ91D±0.005 mmNo minimum orderISO 9001 / IATF 16949
CNC machining magnesium alloys AZ31B and AZ91D parts
Quick answer

Key takeaways

The chip is the fire risk, not the blockFine magnesium dust ignites far below the melting point of the workpiece. Never let it accumulate.
Run sharp tools with high rake2-flute or 3-flute carbide, 10–15° rake, polished flutes, no coating needed for most jobs.
High speed, heavy feed, no dwellCutting speeds run 2–4× aluminum. Never let the tool rub or pause in the cut.
Dry or mineral-oil mist onlyWater-based coolant reacts with magnesium chips and releases hydrogen. Keep water away.
Magnesium is not always the answerIt wins on weight and speed, loses on corrosion resistance and cost versus aluminum.
Why the material behaves this way

What makes CNC machining magnesium different

Magnesium is the lightest structural metal in common use, about 35% lighter than aluminum and roughly two-thirds lighter than steel. Density sits near 1.74 g/cm³ for AZ31B and 1.81 g/cm³ for AZ91D. That is the whole reason the material shows up in aircraft brackets, drone frames, camera housings and handheld medical devices. Every gram saved upstream is payload or battery life downstream.

The machining behavior follows from the same low density. Magnesium has a low specific heat and high thermal conductivity, so heat leaves the cut quickly and the workpiece stays cool. It machines with low cutting forces, which means less chatter, less tool deflection and better surface finish on thin walls. On a well-set-up machine, magnesium can hold the same ±0.005 mm tolerance as aluminum without special fixturing.

The catch is ignition. Solid magnesium is not easy to light because the bulk metal conducts heat away from any local hot spot. The problem starts with fines. A 0.1 mm chip has a large surface-to-volume ratio, heats up in milliseconds, and can ignite at a temperature well below the melting point of the workpiece. Once burning, magnesium supplies its own oxygen and burns hot enough to crack concrete and set off water-based coolant fires.

That single fact drives every rule in this article. Tool geometry, feed rate, chip evacuation, coolant choice and housekeeping all exist to keep the cut cool and the chips out of the machine bed. If your shop already machines aluminum well, you are close. The fire discipline is what you have to add.

  • 1
    Density1.74–1.81 g/cm³, the lightest structural option in most shops
  • 2
    Cutting forceLow, so thin walls and small tools behave better than in steel
  • 3
    Real hazardFine chips and dust, not the solid workpiece
Alloy choice

Pick the right magnesium alloy before you cut

AZ31B and AZ91D cover most machining work, and they behave differently. AZ31B is a wrought alloy: rolled or extruded plate, good ductility, better surface finish, easier to form. It is the default for prototypes, brackets and housings that will be machined from plate. AZ91D is a die-casting alloy, harder and stronger in the as-cast state, but it contains more aluminum and can be more abrasive on tool edges over long runs.

If the drawing calls out a casting, you may be finishing a die-cast or thixomolded blank rather than cutting from solid. That changes the setup: cast skins carry porosity and hard spots, and you want to take a light first pass to get under the skin before you trust your tool life numbers. For a machined-from-solid prototype, AZ31B plate at 25–50 mm thickness is the usual choice.

Ask what the part will do after machining, because the alloy choice usually follows the environment. AZ91D offers better corrosion resistance and strength at room temperature, which suits housings that see handling and humidity. AZ31B is more ductile and weldable, which suits brackets that need to bend or take impact without cracking.

One caution on mixing: never machine magnesium on a machine that just ran steel, cast iron or aluminium with water-based coolant, without a full clean-down first. Swarf from the previous job carries moisture and fine metal dust into the chip pile. That is a small thing that has started real fires.

Tooling and parameters

Tool geometry, speeds and feeds that work

Use sharp, uncoated carbide with a high rake angle. For end mills, 2 flutes or 3 flutes with 10–15° helix and a polished flute surface work well; a 15–20° rake reduces cutting pressure and keeps the chip curling away from the wall. Coatings like TiAlN are not required for most magnesium jobs and can round the cutting edge, which raises force and heat. Aluminium-specific geometry is a reasonable starting point.

Run fast and feed hard. Peripheral speeds of 300–600 m/min are normal on magnesium, and many shops push higher on rigid setups. The rule that matters more than the number is chip load: keep it heavy enough that the tool cuts rather than rubs. A rub generates fine dust instead of a chip, and dust is exactly what you are trying to avoid. If the chips come off as powder, increase feed per tooth before you touch spindle speed.

Avoid dwell and hesitation. Any pause with the cutter touching the work converts spindle energy into heat at one point. Ramp into cuts, use helical entry, and keep the tool moving through corners. On finishing passes with small stepovers, raise the feed to keep the chip thickness at the cutting edge up in a healthy range.

Rigidity pays off twice on magnesium. It reduces chatter, and it lets you use aggressive parameters that shorten cycle time. Thin walls down to 1.0–1.5 mm are achievable with light radial passes and a stable fixture. Watch for chips packing into pockets; a high-pressure air blast clears them better than coolant.

  • 1
    ToolSharp uncoated carbide, 2–3 flutes, 10–15° rake, polished flutes
  • 2
    Surface speed300–600 m/min, higher on rigid setups
  • 3
    Chip loadHeavy enough to make a chip, never a powder
  • 4
    EntryHelical or ramp, no plunge, no dwell
Safety

Fire prevention is a housekeeping discipline

Most magnesium fires in machine shops start with accumulated fines, not with a cutting pass. The fix is boring and effective: keep the machine clean, keep the swarf bin empty, and never let dust build up on ledges, in the base casting or inside the extraction duct. A single dry cut can throw a spark into a pile of fines that has been sitting for a week.

If a small fire starts, smother it. Dry sand, dry graphite powder or a Class D extinguisher are the correct agents. Water makes it worse: it reacts with burning magnesium to release hydrogen, which can explode. A water-based coolant flood on a magnesium fire is the classic way a small incident becomes a serious one.

Tool wear matters for safety too. A dull cutter rubs, generates fines and heat, and increases the chance of ignition. Change tools on a schedule rather than waiting for a poor finish. On long production runs, log tool life by part count and replace before the edge breaks down.

Post-processing has its own rules. Bead blasting and tumbling create fine dust, so use a dedicated cabinet with extraction and never blast magnesium in a cabinet that also handles steel or aluminum without a full clean. Laser marking is safe because it does not generate airborne fines, but it must be done on a clean part with no oil film.

Finishing and corrosion

Finishing magnesium parts and protecting them

Bare magnesium corrodes quickly in humid air, and chloride exposure accelerates it. Any part that leaves the shop needs a protective finish. For machined housings, the common routes are a chromate-free conversion coating followed by powder coat or paint, chemical conversion plus an epoxy primer, or a hard anodizing-type treatment where wear resistance matters.

GreatLight runs anodizing, electroless nickel, zinc and silver plating, powder coating, black oxide, bead blasting, tumbling, brushing and polishing in-house. Not every finish suits magnesium, and the ones that do need care: plating baths can attack magnesium if the pre-treatment is wrong, so the sequence matters more than the finish name.

Machined surfaces should be free of embedded iron before coating. If a part was blasted in a cabinet shared with steel, fine iron contamination will show up later as rust spots under the paint. Use a dedicated magnesium cabinet or switch to chemical deoxidation.

Laser marking works well for part numbers on magnesium, with a minimum character height of 1.5 mm for reliable legibility. Engraved marks should sit outside high-stress areas and away from thin-wall sections.

Process sheet

Step by step: setting up a magnesium job

Work through these in order. Skipping step 2 is how shops get fires.

  • 1
    Clear the machine and confirm the alloyRemove all swarf and coolant from the previous job. Confirm the alloy certificate for AZ31B or AZ91D and check the stock for hard cast skin if it is a casting.
  • 2
    Set the fire rules before the first cutKeep a Class D extinguisher within reach and a dry sand bucket at the machine. No water, no foam, no CO₂ as the primary agent. Post the rule at the control.
  • 3
    Choose dry machining or mineral-oil mistDry with high-pressure air blast is the safest default. If you need lubrication for a deep pocket, use a mineral-oil mist at low volume. Never use water-based coolant.
  • 4
    Load sharp tooling and check runoutMount a sharp 2-flute or 3-flute uncoated carbide cutter. Check runout at the cutting edge; keep it under 0.01 mm so one flute is not doing all the work.
  • 5
    Set aggressive roughing parametersStart around 400 m/min surface speed with a chip load that produces a distinct curl, not dust. If you see powder, increase feed per tooth by 20% before changing anything else.
  • 6
    Evacuate chips continuouslyUse air blast or a chip conveyor rated for dry swarf. Never let chips pile in the enclosure or the chip bin. Empty the bin at every shift change on long runs.
  • 7
    Finish with light passes and air onlyTake finishing passes at Ra 0.8–1.6 μm with no coolant, then inspect. A ±0.005 mm tolerance is routine if the setup is rigid and the tool is fresh.
  • 8
    Clean down and dispose of swarf properlyVacuum or brush out all fines. Store magnesium swarf in a covered metal container, separate from other metals, and follow your local rules for transport and recycling.
Alloy selection

AZ31B vs AZ91D for CNC machining magnesium

Both alloys machine well. The difference is where the part lives after the cut.

PropertyAZ31BAZ91D
Typical formWrought plate or extrusionDie casting or thixomolded blank
Density≈1.74 g/cm³≈1.81 g/cm³
DuctilityHigher, bends before crackingLower, more brittle in thin sections
Corrosion resistanceModerate, needs coatingBetter, still needs coating
Machining feelClean chips, good finishMore abrasive on tool edges
Best fitPrototypes, brackets, housingsCast housings, covers, structural frames
Process choices

Magnesium vs aluminum: when to choose which

Both are light, both machine fast. The decision usually comes down to weight target, environment and budget.

FactorMagnesiumAluminum 6061-T6
Density1.74–1.81 g/cm³2.70 g/cm³
Machining speedVery high, less heat in cutHigh, well understood
Fire riskReal, from fines and dustLow, chips do not ignite
CorrosionPoor bare, needs coatingGood with natural oxide
WeldingRequires special processRoutine
Typical useWeight-critical housings, framesGeneral parts, brackets, enclosures

Run magnesium like a fast metal with a fire problem

If the weight saving justifies the coating step and the fire discipline, magnesium is one of the fastest metals you can put on a CNC. If the part only needs to be light, aluminum 6061-T6 is easier to source, easier to finish and easier to weld. Decide that before you cut, not after.

FAQs

Magnesium machining questions engineers ask

Can you machine magnesium with water-based coolant?

No. Water reacts with magnesium chips and fine dust to produce hydrogen gas, and a flood of water on a burning chip pile can make the fire spread. Use dry machining with a high-pressure air blast, or a mineral-oil mist at low volume for deep pockets and delicate finishes.

If your shop only has flood coolant machines, run the magnesium job dry with air blast and check that the machine has been cleaned of all previous water-based coolant and swarf first.

What causes magnesium to catch fire during CNC machining?

Fine chips and dust, not the solid workpiece. A thin chip has a very high surface-to-volume ratio and heats up in milliseconds during a cut. If the tool rubs instead of cutting, or if fines accumulate in the enclosure or chip bin, a spark or hot chip can ignite the pile.

Keep the tool sharp, keep the feed high enough to make a real chip, and clean out fines at every shift change.

What feeds and speeds should I start with for AZ31B?

Start around 300–600 m/min surface speed with an uncoated 2-flute or 3-flute carbide cutter and a chip load that produces a visible curl. If the chips come off as powder, increase feed per tooth rather than spindle speed.

Rigidity and sharp tooling matter more than the exact numbers. On a stable setup, magnesium cuts two to four times faster than aluminum.

Does magnesium need a protective coating after machining?

Yes, if the part will see humid air or handling. Bare magnesium corrodes quickly, and chloride exposure speeds that up. Chemical conversion coatings, powder coat and paint are common routes. GreatLight runs anodizing, plating, powder coating, bead blasting, tumbling and polishing in-house.

Tell us the environment and the mating surfaces when you request a quote, so the finish sequence is planned before the part is cut.

Can GreatLight machine small magnesium prototypes and production runs?

Yes. There is no minimum order quantity, so a single prototype and a 10,000+ part run both fit. We machine magnesium AZ31B and AZ91D alongside aluminum, stainless, steel, titanium, copper and engineering plastics.

Our 127 CNC machines include 16 simultaneous 5-axis centers and a Ø400 mm rotary table, with a maximum processing size of 4,000 mm. Quotation and free DFM analysis come back within 12 hours, and production can start within 24 hours.

How do you handle magnesium swarf and dust safely?

Chips and fines go into a covered metal container, kept separate from other metal swarf, and the machine is cleaned out at every shift change on long runs. We use dry machining with air blast or mineral-oil mist, and keep Class D extinguishing media at the machine.

Every part is inspected before shipment, with raw material checks, in-process monitoring and final inspection reports available on request.

Send us your magnesium part

Upload a STEP file and we will return a quote, a DFM review and a magnesium process plan within 12 hours. Uploads are secure and confidential, and an NDA is available on request.

12-hour quote100% inspectionNo minimum orderISO 9001 / IATF 16949

Follow GreatLight

More machining notes from the shop floor

We publish setup notes, tooling trials and inspection data from the factory floor.

FacebookTikTokYouTubeLinkedInInstagramThreadsPinterest

Trusted by engineers and manufacturers worldwide

Tesla Ford Motor Company BYD Auto Denso Magna International Boeing Airbus Medtronic KUKA FANUC