diff --git a/features.admin.inc b/features.admin.inc
index 4e12576..fb9eafa 100644
--- a/features.admin.inc
+++ b/features.admin.inc
@@ -1351,6 +1351,9 @@ function features_feature_diff($feature, $component = NULL) {
     $rows = array();
     foreach ($overrides as $component => $items) {
       $rows[] = array(array('data' => $component, 'colspan' => 4, 'header' => TRUE));
+      // Normalize line endings to be cross-platform independent.
+      $items['default'] = str_replace(array("\r\n", "\r"), "\n", $items['default']);
+      $items['normal'] = str_replace(array("\r\n", "\r"), "\n", $items['normal']);
       $diff = new Diff(explode("\n", $items['default']), explode("\n", $items['normal']));
       $rows = array_merge($rows, $formatter->format($diff));
     }
diff --git a/features.drush.inc b/features.drush.inc
index 9da547d..b6fb271 100644
--- a/features.drush.inc
+++ b/features.drush.inc
@@ -864,6 +864,9 @@ function drush_features_diff() {
     $overrides = array_intersect_key($overrides, array_flip($filter_ctypes));
   }
   foreach ($overrides as $component => $items) {
+    // Normalize line endings to be cross-platform independent.
+    $items['default'] = str_replace(array("\r\n", "\r"), "\n", $items['default']);
+    $items['normal'] = str_replace(array("\r\n", "\r"), "\n", $items['normal']);
     $diff = new Diff(explode("\n", $items['default']), explode("\n", $items['normal']));
     drush_print();
     drush_print(dt("Component type: !component", array('!component' => $component)));
diff --git a/features.export.inc b/features.export.inc
index 2f32c95..8121da6 100644
--- a/features.export.inc
+++ b/features.export.inc
@@ -305,6 +305,8 @@ function features_export_render($export, $module_name, $reset = FALSE) {
   // Finalize strings to be written to files
   $code = array_filter($code);
   foreach ($code as $filename => $contents) {
+    // Normalize line endings to be cross-platform independent
+    $contents = str_replace(array("\r\n", "\r"), "\n", $contents);
     $code[$filename] = "<?php\n/**\n * @file\n * {$module_name}.{$filename}.inc\n */\n\n". implode("\n\n", $contents) ."\n";
   }
 
