diff --git a/core/commands/dns.go b/core/commands/dns.go
index 56bbd563768375aee4becd69c4a4ab3aede63fd6..ee10807c80a3c6f85658f977d189df0672a37724 100644
--- a/core/commands/dns.go
+++ b/core/commands/dns.go
@@ -75,7 +75,7 @@ The resolver will give:
 			if !ok {
 				return nil, util.ErrCast()
 			}
-			return strings.NewReader(output.Path.String()), nil
+			return strings.NewReader(output.Path.String() + "\n"), nil
 		},
 	},
 	Type: ResolvedPath{},
diff --git a/core/commands/id.go b/core/commands/id.go
index 8de6cfa07dad4ea419ada9d309f74f555b9803f0..b492bf80b569ff6cb381b332ebf5f2adc342780d 100644
--- a/core/commands/id.go
+++ b/core/commands/id.go
@@ -133,6 +133,7 @@ ipfs id supports the format option for output with the following keys:
 				if err != nil {
 					return nil, err
 				}
+				marshaled = append(marshaled, byte('\n'))
 				return bytes.NewReader(marshaled), nil
 			}
 		},