Alter Views arguments from URL
It is a build in function in drupal views. When you add a contextual filter there would a section called more. You can put the case to lower case and check "Transform spaces to dashes in URL"