// Import Java UUID Utils import java.utils.UUID; // Execute function fromString() with your string as argument. // Returns an uuid, which is your string converted into an UUID. UUID uuid = UUID.fromString(string);