M420 - Bed Leveling State


Get and/or set the enabled state of bed leveling compensation, plus Z fade height.

This command has been extended with L to load a mesh for Unified Bed Leveling.


The “current position” may change in response to M420 Sn.

G28 disables bed leveling. Follow with M420 S to turn leveling on, or use RESTORE_LEVELING_AFTER_G28 to automatically keep leveling on after G28.


M420 [C<bool>] [L<int>] [S<bool>] [T<0|1|4>] [V<bool>] [Z<linear>]

Center the mesh on the mean of the lowest and highest points


Load mesh from EEPROM index (Requires AUTO_BED_LEVELING_UBL and EEPROM_SETTINGS)


Enabled state


Format to print the mesh data

  • T0:

    Human readable

  • T1:


  • T4:



Verbose: Print the stored mesh / matrix data


Leveling fade Z height (Requires ENABLE_LEVELING_FADE_HEIGHT)