How to convert hexadecimal ip address to standard ipv4 address


I'm currently trying to convert hexadecimal ip address into A.B.C.D format.

This ip field is a string "0a0a0b43" for exemple and the result has to be
I've done some attempts but whitout success...

By advance, thanks you :slight_smile:


There are some libraries in java which can convert hex to string and you may use that.
And then you can make a user defined function of it.
java example:

public static String convertHexToIP(String hex)
    String ip= "";

    for (int j = 0; j < hex.length(); j+=2) {
        String sub = hex.substring(j, j+2);
        int num = Integer.parseInt(sub, 16);
        ip += num+".";

    ip = ip.substring(0, ip.length()-1);
    return ip;

a more generic approach is described here:

Does this help you?


1 Like

Hi Kees,

Thanks you for your quickness!
I think it will be good, i've just to find how to create and use user-defined java procedures in Neo4j


that is here:

Thanks you very much Kees!

Have a nice day :slight_smile: