nip.io allows you to do that by mapping any IP Address to a hostname using the following formats:
nip.io maps <anything>[.-]<IP Address>.nip.io in "dot", "dash" or "hexadecimal" notation to the corresponding <IP Address>:
The "dash" and "hexadecimal" notation is especially useful when using services like LetsEncrypt as it's just a regular sub-domain of nip.io
nip.io is powered by PowerDNS with a simple, custom PipeBackend written in Python: backend.py
It's open source, licensed under Apache 2.0: https://github.com/exentriquesolutions/nip.io — pull requests are welcome.