Easiest way is simply XOR the database auto-increment ID with a fixed number, then truncate to (AND to) however many bits seem reasonable for your site.<p>Not super secure, but good enough for this purpose.<p>Unless you have a long ID people can always simply try every ID, no matter what format you use. So fancy encryption on the ID isn&#x27;t all that useful.<p>If security is important then generate a random 64bit number and store that, rather than let the database auto-generate a number.