import java.utils.UUID; String strInput = "-1068942631"; String uuidFromString = UUID.nameUUIDFromBytes( String.valueOf( strInput ).getBytes() ).toString(); System.out.println(uuidFromString);