Marlin / Ender 3 (V2 & Pro & S1 & Neo) Babystep Z – Explained

One of the fundamentals of correctly configuring your Ender 3 is ensuring that the gap between the nozzle and the print bed is neither too large nor too low, as a misconfiguration here can easily cause a plethora of issues, whether it’s the first layer not adhering to the bed at all, gaps appearing on the first layer, or the first layer being severely under-extruded.

In this guide, we will explain the purpose of the Marlin Firmware Babystep Z feature that you can come across on your Ender 3, take you through the process of enabling this feature in Marlin Firmware if your Ender 3 doesn’t have access to it with the currently installed firmware, and explain how you can use this feature to improve your prints.

What Is the Ender 3 (V2 & Pro & S1 & Neo) / Marlin Firmware Babystep Z (Live Z Offset Tuning) Feature?

The Babystep Z feature in Marlin Firmware makes it possible to make minor adjustments to the Z-axis position in real-time as the printing process is taking place, which gives you a chance to apply some quick corrections in cases where the printhead ends up being too far away from or too close to the build plate at the start of the print.

That being said, unlike regular movement, which changes the current Z-axis position value of your 3D printer accordingly, the adjustments you make to the Z-axis position with the Babystep Z feature won’t have an effect on the displayed Z-axis position value despite the nozzle moving in real-time as a result of the adjustments you make, as the Babystep Z value effectively acts as a temporary offset that lasts until the print is over.

As an example, if you move the Z-axis to the Z5 point by sending the G0 Z1 G-code command as usual, the nozzle will be correctly positioned 5 millimeters away from the build surface, with the Z-axis indicator on the screen showing that the Z-axis value currently equals 5.

On the other hand, in the case where the current Z-axis position of your 3D printer is 5, and you set the Babystep Z value to 1, which would cause the nozzle to go up by 1 millimeter and position itself at the Z6 point, you will notice that the Z-axis indicator on the screen still shows 5, as the changes you apply through the Babystep Z feature won’t have an effect on the current coordinates.

While this may sound unintuitive at first, the Babystep Z feature actually works the same way as setting the Z or probe Z offset value, where the coordinate plane is shifted up or down based on the configuration to shift the Z-axis position accordingly for all the upcoming movement, with the slight difference of the offset only being active until the end of the particular print in the case babystepping, unlike a Z offset or probe Z offset value that stays in the RAM as long as your 3D printer stays on, and can be saved to the EEPROM for permanent storage.

How to Enable the Babystep Z (Live Z Offset Tuning) Feature in Marlin Firmware?

As the Babystep Z feature isn’t active by default in Marlin Firmware, you will need to make the necessary adjustments to the corresponding configuration file before flashing the firmware to your 3D printer if you want to be able to use it.

For this process, the first step you will need to take is to grab the pre-configured Configuration_adv.h and Configuration.h files for your 3D printer from Marlin Firmware Configurations (or the source code of the Marlin fork you’re using if it’s specifically configured for your 3D printer) and open up the Configuration_adv.h file, which is where you will find the parameters that you will need to modify.

You can visit the official GitHub Marlin Configurations repository to find the pre-configured Marlin configuration files for most of the widely-used 3D printers and the official Marlin Firmware GitHub repository to obtain the latest version of the source code, which you will require to compile the firmware.

Next, you will need to locate the //#define BABYSTEPPING line (using the search function of your text editor should make this simple) in the file and remove the // at the start to leave only the #define BABYSTEPPING part, which will activate the Babystep Z feature in the firmware configuration.

marlin enabling babystepping in config

With that done, the following change you will need to make is to enable the BABYSTEP_MILLIMETER_UNITS parameter by removing the // at the start of the line to leave only the #define BABYSTEP_MILLIMETERS_UNITS part, which will allow you to specify distance that the Z-axis will move with each babystep in terms of millimeters rather than stepper motor steps, which will make the configuration easier.

marlin babystep millimeter units config

Following that, set the value of the BABYSTEP_MULTIPLICATOR_Z parameter, which is 1 by default, to 0.01 instead, as this change, combined with BABYSTEP_MILLIMETERS_UNIT enabled, will effectively tell the firmware to move the Z-axis by 0.01 millimeters for each babystep, which is a sufficient amount of movement for fine-tuning purposes.

marlin babystep z multiplicator config

While these changes alone are adequate to enable and correctly configure the Babystep Z feature, we would also like to mention a few optional parameters you can configure to tweak the behavior of this feature in a way that will make things more convenient for you if you have an automatic bed leveling probe, such as a BLTouch, installed on your 3D printer.

The first optional change we recommend making is to enable the BABYSTEP_ZPROBE_OFFSET parameter by removing the // from the //#define BABYSTEP_ZPROBE_OFFSET line, which will tell the firmware to update the probe Z offset value automatically whenever you babystep on the Z axis during a print, effectively removing the need to adjust the probe Z offset manually according to your findings after the print.

marlin babystep z probe offset config

The second and final optional change we recommend to the configuration is to enable BABYSTEP_ALWAYS_AVAILABLE by removing the // from the //#define BABYSTEP_ALWAYS_AVAILABLE line, which will cause the Babystep Z feature to be always available, regardless of whether your 3D printer is printing or idle, and combined with BABYSTEP_Z_PROBE OFFSET, makes the Babystep Z feature a great tool to configure your probe Z offset value in general.

marlin babystep always available config

Now that the configuration part is over, all that’s left to do is to move your updated configuration files over to the Marlin source code directory, compile the firmware (Auto Build Marlin makes this easy), and flash it to your 3D printer, which should add the Babystep Z (or Babystep Z Probe Offset with BABYSTEP_Z_PROBE_OFFSET enabled) entry into the menus whenever you’re printing (or all the time with BABYSTEP_ALWAYS_AVAILABLE enabled), such as inside the Tune menu for a standard Ender 3.

How to Use the Babystep Z (Live Z Offset Tuning) Feature?

The first thing you will need to do to use the Babystep Z feature is to start a print, as you will only be able to access the option for it as the print is ongoing (unless you have explicitly enabled BABYSTEP_ALWAYS_AVAILABLE as well), which is the primary usage area for the feature.

ender 3 v2 started print example

Next, you will need to enter the Tune menu by selecting the corresponding option through the LCD controller of your 3D printer, which will take you to the area where you can find the printer settings you can adjust as the print takes place.

ender 3 v2 tune menu example

Once you’re in the Tune menu, find the Babystep Z feature by scrolling through, which can be labeled differently based on the firmware and the configuration you’re using, such as Babystep Z, Z Babystepping, Babystep Z Probe Offset, Z Probe Offset, or practically anything else that contains the words Babystep or Z Probe, and click on it.

ender 3 v2 babystepping z

After this point, every turn of the knob will increase or decrease the Babystep Z value and move the nozzle accordingly in real-time (by the amount specified with BABYSTEP_MULTIPLICATOR_Z), with negative values bringing the nozzle closer to the build plate and positive values pulling the nozzle away from the build plate.

Alternatively, you can also use the M290 G-code command to achieve the same effect if you prefer using a terminal instead of the LCD controller, such as sending the M290 Z1.9 command to move the nozzle up by 1.9 mm (assuming that BABYSTEP_MILLIMETER_UNIT is active).

babystepping with m290 gcode in octoprint

As it’s entirely possible to cause the nozzle to either dig into the print, get way too far away from it, or even crash into the build surface while using this feature, with all cases possibly leading to print failure (and damage to your 3D printer), we highly recommend watching the position of the nozzle very closely when babystepping on the Z axis, and only making minor adjustments that won’t change the nozzle Z-axis position drastically during a print.


While enabling it is not a complete necessity by any means, as it’s entirely possible to correctly configure your probe Z offset value without using the babystepping feature, having access to it can come in pretty handy in a scenario where you notice that the printhead is improperly positioned on the Z-axis since it will allow you to quickly fix the problem without restarting the print.

That being said, if you keep finding yourself having to use the babystepping Z feature to correct the nozzle’s positioning on the Z-axis, it’s most likely a better idea to take a look at other factors, such as the tramming of the bed, the probe Z offset value, and the bed leveling mesh, as your 3D printer shouldn’t require correction through babystepping for every single print.