Nozzle Notes
Slicers & software

Retraction 3D Printing: Settings Explained

Retraction pulls filament back before travel moves to stop ooze and stringing. Learn each setting, typical starting values and how to tune them.

By Sepehr Sabbagh-pour · Published · Updated · 6 min read

Illustration: a close-up of a nozzle tip with a bead of orange filament being drawn back up into it, the strand thinning
AI-generated illustration

Retraction in 3D printing is the slicer setting that pulls filament back into the nozzle before a travel move, then pushes it forward again, so plastic does not ooze across gaps. The best length is the shortest one that prints a clean test tower, and it depends on your extruder and material.

This guide explains each retraction setting, typical starting values from slicer documentation, and how to tune them. It is research-based, so treat every number as a starting point.

What does retraction do?

Retraction stops molten plastic leaking from the nozzle while the print head moves between parts. Prusa's documentation puts it simply: when the extruder finishes one section of the G-code, the filament is pulled back into the nozzle, and once the extruder reaches the next location the filament is pushed out and extrusion continues. The OrcaSlicer wiki describes the goal as preventing oozing and stringing during non-print moves.

Without retraction, molten plastic keeps seeping from the nozzle during travel, leaving fine strings and small blobs between parts. If you already see those, start with our guide to fixing stringing, which puts retraction in the right order after wet filament and temperature.

The main retraction settings

SettingWhat it doesWatch out for
Retraction lengthHow far the filament is pulled backToo short does not stop oozing; too long can cause clogs or under-extrusion (OrcaSlicer)
Retraction speedHow fast the extruder pulls backPrusa notes higher speed improves stringing, but too high can skip steps in the motor
Deretraction speedHow fast filament is pushed back inIn OrcaSlicer, zero means the same as retraction speed
Extra length on restartPushes a little extra after a retractionRarely needed; only if the start of lines looks thin
Minimum travel (threshold)Only retract on moves longer than thisPrusa's preset is 1 mm; raising it saves time but increases oozing and stringing
Retract on layer changeForces a retraction at each new layerPrusa recommends leaving it on
Wipe while retractingMoves the nozzle along the last path while retractingCleans leaked material and can reduce blobs (OrcaSlicer, Prusa)
Lift Z (z-hop, see Z hop explained)Raises the nozzle during travelPrusa says a lower value improves stringing, but disabling it may let the nozzle hit the part

Typical starting values

Every printer and material is different, but the documentation gives sensible ranges to begin with:

  • Direct-drive extruders: the OrcaSlicer retraction test defaults to a sweep from 0 to 2 mm in 0.1 mm steps, which it describes as suitable for most direct-drive extruders.
  • Bowden extruders: OrcaSlicer suggests widening that sweep to 1 to 6 mm in 0.2 mm steps.
  • Prusa i3 MK2.5/MK3 family: Prusa says retraction length should be a maximum of 2 mm. The Bowden-fed MINI presets use a longer default of 3.2 mm.
  • Clean filaments: OrcaSlicer notes that for materials with minimal oozing, such as PLA or ABS, the tower may look clean from the start, and a length of 0.2 to 0.4 mm may be enough.

The reason for the difference is the filament path. In a Bowden setup the extruder sits away from the hotend, so the filament has to move farther before the nozzle feels any change. Our comparison of direct drive vs Bowden covers the trade-offs.

Material matters

OrcaSlicer says PETG and TPU are more prone to stringing than PLA or ABS and may need longer retraction. Prusa says flexible filaments usually need longer retractions because the material stretches while it is pulled back, and that they can need a lot of tuning. Slicers let you override the printer's retraction values per filament so you can keep separate values for each material. For a look at how these materials differ, see PETG vs PLA.

How do you tune retraction step by step?

Rule out wet filament and heat first, then print a retraction tower and keep the shortest length that looks clean.

  1. Rule out other causes. Dry the spool, check the nozzle is clean and not leaking, and confirm the temperature is within the range on the spool. OrcaSlicer advises drying the filament and checking the nozzle is properly installed if stringing remains. Our guide to drying filament explains how.
  2. Start from the stock profile. Prusa recommends its official preset settings. A profile made for your printer already has sensible values.
  3. Print a retraction tower. OrcaSlicer generates a tower with notches printed at different retraction lengths. The best length is the shortest one that gives the cleanest tower.
  4. Read the result from the G-code, not the notch. OrcaSlicer warns to use the Calib_Retraction_tower comment in the G-code preview rather than the plain retract command, because the real retraction may be split with a wipe.
  5. Change one thing at a time. Adjust length first, then speed, then wipe and minimum travel.

How do you run and read the retraction tower?

OrcaSlicer's retraction test asks for a start, end and step value, with defaults of 0, 2 and 0.1 mm for direct drive; for Bowden it suggests 1, 6 and 0.2 mm. After printing:

  1. Find the section of the tower with the least stringing and oozing.
  2. Measure that section's height from the base.
  3. Open the G-code preview, search for the Calib_Retraction_tower comment and match your measured height to the retraction length written there.
  4. Enter the shortest length that still gave a clean section, then print a real model to confirm.

If the top of the tower still shows heavy stringing, OrcaSlicer says to dry the filament and check the nozzle is installed without leaks. Retraction cannot fix a leaking nozzle.

What else causes stringing besides retraction?

Prusa's stringing page names several causes that retraction values will not cure. Check them before raising the length:

  • Residue in the nozzle. After long runs of one material such as PETG, leftovers can string; clean the nozzle thoroughly before the next print.
  • Moisture. Wet filament causes a lot of stringing. Prusa suggests trying a different spool to test this.
  • Poor hotend heat dissipation. Prusa suggests re-applying thermal paste between the heatbreak and the heatsink. Follow your printer's maintenance guide for this job.
  • Temperature. Lower the nozzle temperature by 5 to 10 °C and compare.

Prusa's advice on speed and wipe is that a higher retraction speed improves stringing but a speed that is too high may skip motor steps, and to leave retract on layer change and wipe while retracting enabled. Its minimum travel after retraction preset is 1 mm; raising it saves print time but increases oozing and stringing.

Other settings that reduce retractions

Prusa lists several options that cut the number of retractions or their effect:

  • Avoid crossing perimeters: optimizes travel paths to cross fewer walls, which lowers stringing.
  • Only retract when crossing perimeters: skips retraction when the travel stays inside the outer wall, where any ooze will not show.
  • Sequential printing: printing objects one at a time reduces the chance of stringing between them.
  • Lower nozzle temperature: Prusa suggests lowering it by 5 to 10 degrees C and checking whether stringing improves.

Klipper: firmware retraction and pressure advance

For what the setting does and how to tune it, see pressure advance. On Klipper printers you can leave retraction to the slicer or enable firmware retraction. The Klipper configuration reference describes the [firmware_retraction] section as enabling G10 (retract) and G11 (unretract) commands issued by many slicers. Its defaults are a retract length of 0 mm and retract speed of 20 mm/s, so you must set values yourself. For more on the firmware, see what is Klipper.

Pressure advance is a separate feature that compensates for pressure in the nozzle. Klipper's documentation says it reduces ooze during non-extrude moves and blobbing at corners. It also suggests that once pressure advance is tuned, a small slicer retraction (the example given is 0.75 mm) and the slicer's wipe on retract option may still help against ooze, and recommends disabling z-lift on retract. Retraction also affects how clean the layer seam looks; see seam position explained.

Common mistakes

  • Setting a very long retraction to cure stringing that is really caused by wet filament or heat.
  • Raising retraction speed so high that the extruder skips steps.
  • Disabling z-hop to cut stringing and then catching the nozzle on the part.
  • Using the same values for PLA and flexible filament.
  • Tuning on a partly clogged nozzle. If the extruder clicks or the flow looks uneven, deal with that first; see fixing under-extrusion.

Using PrusaSlicer? Its option names, defaults and filament overrides are covered in PrusaSlicer retraction settings.

Frequently asked questions

What does retraction do in 3D printing?

Retraction pulls filament back into the nozzle before the print head travels across a gap, then pushes it forward again when printing resumes. Prusa's documentation describes it this way, and the OrcaSlicer wiki says the goal is to prevent oozing and stringing during non-print moves. Without it, molten plastic keeps seeping out during travel and leaves fine strings and small blobs between parts. It is one of several fixes for stringing, alongside drying the filament and checking the temperature, and it is usually the last one to tune.

What is a good retraction distance?

It depends on the extruder. OrcaSlicer's retraction test defaults to a sweep from 0 to 2 mm, which it describes as suitable for most direct-drive extruders, and it suggests widening the sweep to 1 to 6 mm for Bowden setups. Prusa says retraction length on its MK2.5 and MK3 family should be a maximum of 2 mm. For clean materials such as PLA or ABS, OrcaSlicer notes 0.2 to 0.4 mm may be enough. In every case, use the shortest value that gives clean results.

Can too much retraction cause problems?

Yes. OrcaSlicer notes that a retraction length that is too long can lead to clogs or under-extrusion, so more is not automatically better. Prusa adds that a very high retraction speed can make the extruder motor skip steps. Too little retraction lets plastic ooze, so the aim is the shortest length and a moderate speed that still give a clean result on a retraction tower. If the extruder clicks or the flow looks uneven, check for a partial clog before changing retraction further.

Should I use firmware retraction or slicer retraction?

Either works. Klipper supports firmware retraction through the G10 (retract) and G11 (unretract) commands that many slicers issue, but its defaults are a retract length of 0 mm and a speed of 20 mm/s, so you must set values yourself before it does anything. Slicer retraction keeps the settings inside each filament profile, so you can hold separate values for PLA, PETG and flexible filament, which many people find simpler. Pick one method and avoid mixing them.

Does pressure advance replace retraction?

No. Klipper's documentation says pressure advance compensates for pressure in the nozzle and reduces ooze during non-extrude moves and blobbing at corners. It also suggests that once pressure advance is tuned, a small slicer retraction (the example given is 0.75 mm) and the slicer's wipe on retract option may still help against ooze, and it recommends disabling z-lift on retract. Treat the two as complementary: pressure advance handles the pressure, and retraction handles the ooze during travel.

How do you tune retraction settings?

First rule out other causes: dry the spool, check the nozzle is clean and not leaking, and confirm the temperature is within the range on the spool. Start from your printer's stock profile, then print a retraction tower in OrcaSlicer, which prints notches at different retraction lengths. The best length is the shortest one that gives the cleanest tower. Change one thing at a time: length first, then speed, then wipe and minimum travel.

Sources

Sepehr Sabbagh-pour

Founder and editor

Sepehr Sabbagh-pour

Software engineer since 2009 and Head of Engineering by day, a maker who has owned several 3D printers, writing practical guides to 3D printers, filament and running costs, with every article saying what was and was not tested.

Drafted with AI assistance, then edited and reviewed by Sepehr before it goes live. How we use AI.