Understanding Minecraft UUIDs: How Player Identity Works
Prior to Minecraft release 1.7.6 in 2014, player accounts were identified purely by their in-game username. This caused critical problems whenever players wanted to change their usernames: all player inventories, advancements, permissions, whitelist entries, and bans were wiped out.
To resolve this, Mojang transitioned the entire Minecraft ecosystem to 128-bit Universally Unique Identifiers (UUIDs). Every player in both Minecraft Java Edition and Bedrock Edition is assigned a permanent UUID that acts as the immutable primary key for all world save data.
Online Mode vs. Offline Mode (Cracked / LAN) UUIDs
Minecraft servers handle player identity in two distinct ways depending on the online-mode setting in your server.properties file:
| Feature | Online Mode (online-mode=true) |
Offline Mode (online-mode=false) |
|---|---|---|
| Source | Mojang Authentication Session Server | Server-side calculation from username |
| UUID Version | UUID Version 4 (Random) | UUID Version 3 (MD5 Name-based) |
| Algorithm | Cryptographic random generation by Mojang | MD5("OfflinePlayer:" + username) |
| Name Changes | UUID stays the same when username changes | UUID changes if username changes |
| Custom Skins | Fetched from official Mojang skin servers | Requires skin-restorer plugin (e.g. SkinRestorer) |
The Offline Player UUID Formula (RFC 4122 Version 3)
In offline mode (used widely in LAN parties, development testing, and private networks), the server cannot contact Mojang to retrieve the player's account UUID. Instead, it deterministically computes an RFC 4122 Version 3 UUID using the MD5 hash of the string prefix:
// Standard Java Edition Offline UUID Algorithm
String input = "OfflinePlayer:" + username;
byte[] hash = MessageDigest.getInstance("MD5").digest(input.getBytes(StandardCharsets.UTF_8));
// Set Version 3 (0x30)
hash[6] = (byte) ((hash[6] & 0x0f) | 0x30);
// Set Variant 1 (0x80)
hash[8] = (byte) ((hash[8] & 0x3f) | 0x80);
UUID offlineUuid = UUID.nameUUIDFromBytes(hash);
Because MD5 is deterministic, entering the same username will always generate the exact same offline UUID across any Paper, Spigot, Bukkit, or Fabric server worldwide.
Full Hyphenated vs Trimmed UUIDs
In the Minecraft technical ecosystem, UUIDs exist in two standard string representations:
- Full Hyphenated UUID (36 characters): Formatted with hyphens in the standard 8-4-4-4-12 pattern (e.g.
c8e5be26-5b72-3580-b2a6-2007f30e6914). This format is required inside server files likewhitelist.json,ops.json,banned-players.json, and plugin databases. - Trimmed UUID (32 characters): Stripped of all hyphens (e.g.
c8e5be265b723580b2a62007f30e6914). Mojang's official REST API endpoints exclusively accept trimmed UUIDs for skin lookups and profile queries.
Where Minecraft Servers Store Player Data
Server administrators managing Spigot, Paper, Bukkit, or Purpur servers often need player UUIDs to recover lost inventories or fix corrupted player profiles. Player data is stored across three main directories in the root world folder:
world/playerdata/<UUID>.datโ Stores player inventory, Ender Chest contents, health, hunger, XP levels, and coordinates in GZIP-compressed NBT format.world/stats/<UUID>.jsonโ Stores all player statistics (blocks mined, time played, deaths, mob kills).world/advancements/<UUID>.jsonโ Tracks completed advancements and recipe unlocks.
Production Code: Generating Minecraft UUIDs Programmatically
// Java: Native Bukkit / Spigot / Paper implementation
import java.nio.charset.StandardCharsets;
import java.util.UUID;
public class MinecraftUUIDHelper {
public static UUID getOfflinePlayerUUID(String username) {
return UUID.nameUUIDFromBytes(("OfflinePlayer:" + username).getBytes(StandardCharsets.UTF_8));
}
public static String toTrimmed(UUID uuid) {
return uuid.toString().replace("-", "");
}
}
Frequently Asked Questions About Minecraft UUIDs
Minecraft transitioned to UUIDs in update 1.7.6 to allow players to safely change their account usernames without losing their in-game items, permissions, ranks, or stats. UUIDs provide a permanent, non-changeable identifier for each player account.
You can use our generator above by typing the player's username into the Minecraft input field. The tool computes the exact MD5 hash under RFC 4122 v3 with the prefix OfflinePlayer:username, which matches how Spigot, Paper, and Bukkit servers generate offline UUIDs.
Because offline mode uses MD5 name-based UUIDs and online mode uses Mojang's random UUIDv4, every player will receive a completely different UUID upon switching. This will cause the server to create brand new playerdata/<new_uuid>.dat files, appearing as if all inventories and advancements were wiped. Admins must rename old playerdata files to the new online UUIDs or use a migration plugin.
To convert a 32-character trimmed UUID into standard hyphenated format, insert hyphens after character 8, 12, 16, and 20. In JavaScript, you can use the regex: trimmed.replace(/^(.{8})(.{4})(.{4})(.{4})(.{12})$/, '$1-$2-$3-$4-$5').