How to get field label from a field machine name $fields = \Drupal\Core\Entity\EntityTypeManagerInterface-&gt;getStorage('field_storage_config')-&gt;loadMultiple();


This is listing me all the fields. 

foreach ($fields as $key =&gt; $instance) {
   $label = $instance-&gt;getLabel();
   $name = $instance-&gt;getName();
}


$label is giving me node.field_image

$name is giving me field_image

My question is how can we get the label of the field in drupal 8
The label is not stored in the field storage configuration. You'll find the label in the bundle specific field definition:

$definitions = \Drupal::service('entity_field.manager')-&gt;getFieldDefinitions('node', 'page');
foreach (array_keys($definitions) as $key) {
  // get label for field machine name $key:
  $label = $definitions[$key]-&gt;getLabel();
}


Reference: EntityFieldManager::getFieldDefinitions