diff --git entity/entity.controller.inc entity/entity.controller.inc
index b49be05..1c611dc 100644
--- entity/entity.controller.inc
+++ entity/entity.controller.inc
@@ -45,12 +45,12 @@ interface EntityAPIControllerInterface extends DrupalEntityControllerInterface {
   /**
    * Create a new entity.
    *
-   * @param $values
+   * @param array $values
    *   An array of values to set, keyed by property name.
    * @return
    *   A new instance of the entity type.
    */
-  public function create($values = array());
+  public function create(array $values = array());
 
   /**
    * Exports an entity.
@@ -65,6 +65,16 @@ interface EntityAPIControllerInterface extends DrupalEntityControllerInterface {
    */
   public function export($entity, $prefix = '');
 
+  /**
+   * Imports an entity from a string.
+   *
+   * @param string $export
+   *   An exported entity as string.
+   *
+   * @return
+   *   An entity object not yet saved.
+   */
+  public function import($export);
 
   /**
    * Builds a structured array representing the entity's content.
@@ -431,7 +441,7 @@ class EntityAPIController extends DrupalDefaultEntityController implements Entit
   /**
    * Implements EntityAPIControllerInterface.
    */
-  public function create($values = array()) {
+  public function create(array $values = array()) {
     if (isset($this->entityInfo['entity class']) && $class = $this->entityInfo['entity class']) {
       // Add is_new property if it is not set.
       $values += array('is_new' => TRUE);
@@ -449,7 +459,18 @@ class EntityAPIController extends DrupalDefaultEntityController implements Entit
     if ($this->nameKey != $this->idKey) {
       unset($vars[$this->idKey]);
     }
-    return "entity_create('$this->entityType', " . entity_var_export($vars, $prefix) . ")";
+    return entity_var_json_export($vars, $prefix);
+  }
+
+  /**
+   * Implements EntityAPIControllerInterface.
+   */
+  public function import($export) {
+    $vars = drupal_json_decode($export);
+    if (is_array($vars)) {
+      return $this->create($vars);
+    }
+    return FALSE;
   }
 
   /**
diff --git entity/entity.features.inc entity/entity.features.inc
index 2058026..6d1c4ef 100644
--- entity/entity.features.inc
+++ entity/entity.features.inc
@@ -101,11 +101,13 @@ class EntityDefaultFeaturesController {
    */
   function export_render($module, $data, $export = NULL) {
     $output = array();
-    $output[] = '  $items = array(';
+    $output[] = '  $items = array();';
     foreach (entity_load($this->type, $data) as $name => $entity) {
-      $output[] = "    '$name' => " . entity_export($this->type, $entity, '    ') . ',';
+      $output[] = '  $json = <<<JSON';
+      $output[] = '  ' . entity_export($this->type, $entity, '  ');
+      $output[] = 'JSON;';
+      $output[] = '  $items[' . "'$name'" . '] = entity_import(' . "'$this->type', " . '$json);';
     }
-    $output[] = '  );';
     $output[] = '  return $items;';
     $output = implode("\n", $output);
 
diff --git entity/entity.module entity/entity.module
index 4b3e59c..edb6aa7 100644
--- entity/entity.module
+++ entity/entity.module
@@ -132,7 +132,7 @@ function entity_delete_multiple($entity_type, $ids) {
  *   A new instance of the entity type or FALSE if the given entity type isn't
  *   compatible to the CRUD API.
  */
-function entity_create($entity_type, $values) {
+function entity_create($entity_type, array $values) {
   $info = entity_get_info($entity_type);
   if (in_array('EntityAPIControllerInterface', class_implements($info['controller class']))) {
     return entity_get_controller($entity_type)->create($values);
@@ -163,6 +163,23 @@ function entity_export($entity_type, $entity, $prefix = '') {
 }
 
 /**
+ * Imports an entity.
+ *
+ * @param $entity_type
+ *   The type of the entity.
+ * @param string $export
+ *   The string containing the exported entity.
+ * @return
+ *   The imported entity object not yet saved.
+ */
+function entity_import($entity_type, $export) {
+  $info = entity_get_info($entity_type);
+  if (in_array('EntityAPIControllerInterface', class_implements($info['controller class']))) {
+    return entity_get_controller($entity_type)->import($export);
+  }
+}
+
+/**
  * Builds a structured array representing the entity's content.
  *
  * The content built for the entity will vary depending on the $view_mode
@@ -205,10 +222,10 @@ function entity_build_content($entity_type, $entity, $view_mode = 'full', $langc
  * @see entity_extract_ids()
  */
 function entity_id($entity_type, $entity) {
-  $info = entity_get_info($entity_type);
-  if (isset($info['entity class']) && method_exists($info['entity class'], 'identifier')) {
+  if (method_exists($entity, 'identifier')) {
     return $entity->identifier();
   }
+  $info = entity_get_info($entity_type);
   $key = isset($info['entity keys']['name']) ? $info['entity keys']['name'] : $info['entity keys']['id'];
   return isset($entity->$key) ? $entity->$key : NULL;
 }
@@ -562,7 +579,7 @@ function entity_forms($form_id, $args) {
  *   initialized with empty values using entity_create(). Thus entities, for
  *   which this is problematic have to care to pass in an initialized entity.
  * @param $op
- *   One of 'edit', 'add' or 'clone. Defaults to edit.
+ *   One of 'edit', 'add' or 'clone'. Defaults to edit.
  *
  * @return
  *   The fully built and processed form, ready to be rendered.
diff --git entity/entity.ui.inc entity/entity.ui.inc
index 76d95db..b0bee03 100644
--- entity/entity.ui.inc
+++ entity/entity.ui.inc
@@ -81,6 +81,17 @@ class EntityDefaultUIController {
       'access arguments' => array('delete', $this->entityType, $id_count + 1),
       'file' => 'entity.ui.inc',
     );
+    // Menu item for importing an entity.
+    $items[$this->path . '/import'] = array(
+      'title callback' => 'entity_ui_import_title',
+      'title arguments' => array($this->entityType),
+      'page callback' => 'drupal_get_form',
+      'page arguments' => array($this->entityType . '_operation_form', $this->entityType, NULL, 'import'),
+      'access callback' => 'entity_access',
+      'access arguments' => array('create', $this->entityType),
+      'file' => 'entity.ui.inc',
+      'type' => MENU_LOCAL_ACTION,
+    );
 
     if (!empty($this->entityInfo['admin ui']['file'])) {
       // Add in the include file for the entity form.
@@ -178,7 +189,11 @@ class EntityDefaultUIController {
     }
     // Add operations with the right colspan.
     $field_ui = !empty($this->entityInfo['bundle of']) && module_exists('field_ui');
-    $header[] = array('data' => t('Operations'), 'colspan' => $field_ui ? 5 : 3);
+    $exportable = !empty($this->entityInfo['exportable']);
+    $colspan = 3;
+    $colspan = $field_ui ? $colspan + 2 : $colspan;
+    $colspan = $exportable ? $colspan + 1 : $colspan;
+    $header[] = array('data' => t('Operations'), 'colspan' => $colspan);
 
     $render = array(
       '#theme' => 'table',
@@ -221,10 +236,15 @@ class EntityDefaultUIController {
     }
     // In case this is a bundle, we add links to the field ui tabs.
     $field_ui = !empty($this->entityInfo['bundle of']) && module_exists('field_ui');
+    // For exportable entities we add an export link.
+    $exportable = !empty($this->entityInfo['exportable']);
+    $colspan = 3;
+    $colspan = $field_ui ? $colspan + 2 : $colspan;
+    $colspan = $exportable ? $colspan + 1 : $colspan;
 
     // Add operations depending on the status.
     if (entity_has_status($this->entityType, $entity, ENTITY_FIXED)) {
-      $row[] = array('data' => l(t('clone'), $this->path . '/manage/' . $id . '/clone'), 'colspan' => $field_ui ? 5 : 3);
+      $row[] = array('data' => l(t('clone'), $this->path . '/manage/' . $id . '/clone'), 'colspan' => $colspan);
     }
     else {
       $row[] = l(t('edit'), $this->path . '/manage/' . $id);
@@ -245,6 +265,9 @@ class EntityDefaultUIController {
         $row[] = '';
       }
     }
+    if ($exportable) {
+      $row[] = l(t('export'), $this->path . '/manage/' . $id . '/export');
+    }
     return $row;
   }
 
@@ -253,15 +276,48 @@ class EntityDefaultUIController {
    * Builds the operation form.
    */
   public function operationForm($form, &$form_state, $entity, $op) {
-    $label = entity_label($this->entityType, $entity);
     switch ($op) {
       case 'revert':
+        $label = entity_label($this->entityType, $entity);
         $confirm_question = t('Are you sure you want to revert the %entity %label?', array('%entity' => $this->entityInfo['label'], '%label' => $label));
         return confirm_form($form, $confirm_question, $this->path);
 
       case 'delete':
+        $label = entity_label($this->entityType, $entity);
         $confirm_question = t('Are you sure you want to delete the %entity %label?', array('%entity' => $this->entityInfo['label'], '%label' => $label));
         return confirm_form($form, $confirm_question, $this->path);
+
+      case 'export':
+        if (!empty($this->entityInfo['exportable'])) {
+          $export = entity_export($this->entityType, $entity);
+          $form['export'] = array(
+            '#type' => 'textarea',
+            '#title' => t('Export'),
+            '#description' => t('Copy these data and paste them into the import page, to import.'),
+            '#rows' => 25,
+            '#default_value' => $export,
+          );
+          return $form;
+        }
+
+      case 'import':
+        $form['import'] = array(
+          '#type' => 'textarea',
+          '#title' => t('Import'),
+          '#description' => t('Paste an exported %entity_type here.', array('%entity_type' => $this->entityInfo['label'])),
+          '#rows' => 20,
+        );
+        $form['overwrite'] = array(
+          '#title' => t('Overwrite'),
+          '#type' => 'checkbox',
+          '#description' => t('If checked, any existing %entity with the same ID will be replaced by the import.', array('%entity' => $this->entityInfo['label'])),
+          '#default_value' => FALSE,
+        );
+        $form['submit'] = array(
+          '#type' => 'submit',
+          '#value' => t('Import'),
+        );
+        return $form;
     }
     drupal_not_found();
     exit;
@@ -270,7 +326,31 @@ class EntityDefaultUIController {
   /**
    * Operation form validation callback.
    */
-  public function operationFormValidate($form, &$form_state) { }
+  public function operationFormValidate($form, &$form_state) {
+    if ($form_state['op'] == 'import') {
+      if ($entity = entity_import($this->entityType, $form_state['values']['import'])) {
+        if ($form_state['values']['overwrite']) {
+          $form_state[$this->entityType] = $entity;
+        }
+        else {
+          $id = entity_id($this->entityType, $entity);
+          $existing_entity = reset(entity_load($this->entityType, array($id)));
+          if (empty($existing_entity)) {
+            // Entity does not yet exist in the DB.
+            $form_state[$this->entityType] = $entity;
+          }
+          else {
+            $label = entity_label($this->entityType, $entity);
+            $vars = array('%entity' => $this->entityInfo['label'], '%label' => $label);
+            form_set_error('import', t('Import of %entity %label failed, a %entity with the same machine name already exists. Check the overwrite option to replace it.', $vars));
+          }
+        }
+      }
+      else {
+        form_set_error('import', t('Import failed.'));
+      }
+    }
+  }
 
   /**
    * Operation form submit callback.
@@ -285,7 +365,7 @@ class EntityDefaultUIController {
    * Applies an operation to the given entity.
    *
    * @param string $op
-   *   The operation (edit, clone, revert or delete).
+   *   The operation (revert, delete or import).
    * @param $entity
    *   The entity to manipulate.
    *
@@ -309,6 +389,19 @@ class EntityDefaultUIController {
         watchdog($this->entityType, 'Deleted %entity %label.', $vars);
         return t('Deleted %entity %label.', $vars);
 
+      case 'import':
+        // First check if there is any existing entity with the same ID.
+        $id = entity_id($this->entityType, $entity);
+        if ($existing_entity = reset(entity_load($this->entityType, array($id)))) {
+          // Copy DB id and remove the new indicator to overwrite the DB record.
+          $idkey = $this->entityInfo['entity keys']['id'];
+          $entity->{$idkey} = $existing_entity->{$idkey};
+          unset($entity->is_new);
+        }
+        entity_save($this->entityType, $entity);
+        watchdog($this->entityType, 'Imported %entity %label.', $vars);
+        return t('Imported %entity %label.', $vars);
+
       default:
         return FALSE;
     }
@@ -440,6 +533,11 @@ function entity_ui_get_page_title($op, $entity_type, $entity = NULL) {
       return t('Revert @label', array('@label' => $label));
     case 'delete':
       return t('Delete @label', array('@label' => $label));
+    case 'export':
+      return t('Export @label', array('@label' => $label));
+    case 'import':
+      $info = entity_get_info($entity_type);
+      return t('Import @entity_type', array('@entity_type' => $info['label']));
   }
 }
 
@@ -452,6 +550,15 @@ function entity_ui_add_title($entity_type) {
 }
 
 /**
+ * Menu title callback for the 'Import' menu item.
+ */
+function entity_ui_import_title($entity_type) {
+  $entity_info = entity_get_info($entity_type);
+  return t('Import a @entity', array('@entity' => drupal_strtolower($entity_info['label'])));
+}
+
+
+/**
  * Submit builder for the main entity form, which extracts the form values and updates the entity.
  *
  * This is a helper function for entities making use of the entity UI
