I don't think there's anything to "convert". The syntax of the file hasn't changed for decades. But make sure you read pwd_mkdb(8) as the authentication is actually done from /etc/spwd.db and /etc/pwd.db.
Regenerate the password database after manually editing or replacing the
/usr/sbin/pwd_mkdb -p /etc/master.passwd