 <p>Try storing it as bytes:</p> <pre><code>UUID uuid = UUID.randomUUID(); byte[] uuidBytes = new byte[16]; ByteBuffer.wrap(uuidBytes) .order(ByteOrder.BIG_ENDIAN) .putLong(uuid.getMostSignificantBits()) .putLong(uuid.getLeastSignificantBits()); con.createQuery("INSERT INTO TestTable(ID, Name) VALUES(:id, :name)") .addParameter("id", uuidBytes) .addParameter("name", "test1").executeUpdate(); </code></pre> <p>A bit of an explanation: your table is using BINARY(16), so serializing UUID as its raw bytes is a really straightforward approach. UUIDs are essentially 128-bit ints with a few reserved bits, so this code writes it out as a big-endian 128-bit int. The ByteBuffer is just an easy way to turn two longs into a byte array.</p> <p>Now in practice, all the conversion effort and headaches won't be worth the 20 bytes you save per row.</p>