diff --git a/packages/mjml-cli/src/commands/outputToFile.js b/packages/mjml-cli/src/commands/outputToFile.js
index <HASH>..<HASH> 100644
--- a/packages/mjml-cli/src/commands/outputToFile.js
+++ b/packages/mjml-cli/src/commands/outputToFile.js
@@ -17,7 +17,7 @@ const replaceExtension = input =>
     input.replace('.mjml', '').match(/(.)*\.(.)+$/g) ? '' : '.html',
   )
 
-const stripPath = input => input.match(/[^/]+$/g)[0]
+const stripPath = input => input.match(/[^/\\]+$/g)[0]
 
 const makeGuessOutputName = outputPath => {
   if (isDirectory(outputPath)) {
fix guess output path when using backslashes