Available in JavaScript Ruby Python Java PHP CoffeeScript Go and for Node.js .NET

hashids

Generate short hashes from numbers (like YouTube and Bitly).
obfuscate database IDs · use them as forgotten password hashes · invitation codes · store shard numbers

Documentation:

Hashids was designed for use in URL shortening, tracking stuff, validating accounts or making pages private (through abstraction). Instead of showing items as 1, 2, or 3, you could show them as b9iLXiAa, EATedTBy, and Aaco9cy5. Hashes depend on your salt value.