Node Arrange is a Blender add-on for the automatic layout of nodes. With one click it arranges node trees, and no matter the complexity of the tree, nodes end up organised and aligned. Settings can be adjusted to suit your taste.
You'll find it in the Node Editor sidebar under Arrange. Selected nodes can be arranged with Ctrl+Shift+A or Cmd+Shift+A, and recentred with Alt+G.
Written entirely in Python, the add-on is compatible with Blender 4.2 LTS and newer and requires no special permissions. It's released under the GNU General Public License v3.0 or later. Version 1.12.1 fixes an issue where collapsed nodes could be stacked non-optimally. The add-on has been downloaded over 230,000 times and holds a 5.0 rating across 87 reviews on the Blender Extensions platform.