diff --git a/core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php b/core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php
index 8160195a31b7863f8073e1bc204ac17497ed4dee..8c591c9a4179d2063ee2048b55a617a03c24a241 100644
--- a/core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php
+++ b/core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php
@@ -87,7 +87,11 @@ public static function collectRenderDisplay(FieldableEntityInterface $entity, $f
     $bundle = $entity->bundle();
 
     // Allow modules to change the form mode.
-    \Drupal::moduleHandler()->alter('entity_form_mode', $form_mode, $entity);
+    \Drupal::moduleHandler()->alter(
+      [$entity_type . '_form_mode', 'entity_form_mode'],
+      $form_mode,
+      $entity
+    );
 
     // Check the existence and status of:
     // - the display for the form mode,
diff --git a/core/lib/Drupal/Core/Entity/entity.api.php b/core/lib/Drupal/Core/Entity/entity.api.php
index 816817190fc65bcd6e466cdaf44c6567c511fb87..7a375e43c20a9bb4eaa30600719e0af567c0beba 100644
--- a/core/lib/Drupal/Core/Entity/entity.api.php
+++ b/core/lib/Drupal/Core/Entity/entity.api.php
@@ -1877,6 +1877,23 @@ function hook_entity_form_mode_alter(&$form_mode, \Drupal\Core\Entity\EntityInte
   }
 }
 
+/**
+ * Change the form mode of a specific entity type currently being displayed.
+ *
+ * @param string $form_mode
+ *   The form_mode currently displaying the entity.
+ * @param \Drupal\Core\Entity\EntityInterface $entity
+ *   The entity that is being viewed.
+ *
+ * @ingroup entity_crud
+ */
+function hook_ENTITY_TYPE_form_mode_alter(string &$form_mode, \Drupal\Core\Entity\EntityInterface $entity): void {
+  // Change the form mode for nodes with 'article' bundle.
+  if ($entity->bundle() == 'article') {
+    $form_mode = 'custom_article_form_mode';
+  }
+}
+
 /**
  * Alter the settings used for displaying an entity form.
  *
diff --git a/core/modules/system/tests/modules/entity_test/entity_test.module b/core/modules/system/tests/modules/entity_test/entity_test.module
index 4a6d4ab714404c4e9f06328008a5d6e769493667..d4ee147ee841ec761e36a348cceaa23052d758f6 100644
--- a/core/modules/system/tests/modules/entity_test/entity_test.module
+++ b/core/modules/system/tests/modules/entity_test/entity_test.module
@@ -819,3 +819,12 @@ function entity_test_query_entity_test_access_alter(AlterableInterface $query) {
     $query->condition('entity_test_query_access.name', 'published entity');
   }
 }
+
+/**
+ * Implements hook_ENTITY_TYPE_form_mode_alter().
+ */
+function entity_test_entity_test_form_mode_alter(&$form_mode, EntityInterface $entity): void {
+  if ($entity->getEntityTypeId() === 'entity_test' && $entity->get('name')->value === 'test_entity_type_form_mode_alter') {
+    $form_mode = 'compact';
+  }
+}
diff --git a/core/modules/system/tests/src/Functional/Entity/EntityFormTest.php b/core/modules/system/tests/src/Functional/Entity/EntityFormTest.php
index d29cf446ae055f5e6c0713bc9db26a05e1362aaf..04dd2a5f36ca1ec16dabedcf71007f9bdfff7122 100644
--- a/core/modules/system/tests/src/Functional/Entity/EntityFormTest.php
+++ b/core/modules/system/tests/src/Functional/Entity/EntityFormTest.php
@@ -73,9 +73,10 @@ public function testMultilingualFormCRUD() {
   }
 
   /**
-   * Tests hook_entity_form_mode_alter().
+   * Tests hook_entity_form_mode_alter() and hook_ENTITY_TYPE_form_mode_alter().
    *
    * @see entity_test_entity_form_mode_alter()
+   * @see entity_test_entity_test_form_mode_alter()
    */
   public function testEntityFormModeAlter() {
     // Create compact entity display.
@@ -107,6 +108,13 @@ public function testEntityFormModeAlter() {
     $entity2->save();
     $this->drupalGet($entity2->toUrl('edit-form'));
     $this->assertSession()->elementNotExists('css', 'input[name="field_test_text[0][value]"]');
+
+    $entity3 = EntityTest::create([
+      'name' => 'test_entity_type_form_mode_alter',
+    ]);
+    $entity3->save();
+    $this->drupalGet($entity3->toUrl('edit-form'));
+    $this->assertSession()->elementNotExists('css', 'input[name="field_test_text[0][value]"]');
   }
 
   /**