String aString="JUST_A_TEST_STRING"; String result = UUID.nameUUIDFromBytes(aString.getBytes()).toString();