©SQL :: Manager
HomeProgram InformationTechnical detailsFree downloadDonate for a cup of coffee
This website works better with Javascript
The MyWAY SQL Manager can be downloaded here for free: as PHP installation file as GZIP file as ZIP archive
If the download from this page does not work, you can also download the program here (Virus checked at heise.de).
By downloading you accept the General Terms and Conditions
The program MyWAY SQL-Manager only works with Javascript
myway SQL Manager for MySQL and MariaDB, Download on Uptodown
SQL functionMySQLMariaDB

The INET6_NTOA SQL Function in MySQL and MariaDB - Convert binary to IPv6 address

INET6_NTOASyntax:INET6_NTOA(Binary string)
Return value:CHAR
Function type:Miscellaneous function
Function Description

The INET6_NTOA() function converts a "Binary string" to an IPv6 address.

If the "Binary string" argument is invalid or NULL, the INET6_NTOA() function returns NULL.


INET6_NTOA() is the inverse function of INET6_ATON().

SQL Examples for the INET6_NTOA function

 1
 2
 3
 4
 5
 6
 7
 8
 9
10

SELECT INET6_NTOA(unhex('FE800000000000008ADE7CFFFEF7E3A5'));
SELECT INET6_NTOA(unhex('2A023030081ED48DCD91E9725C6B90A8'));
SELECT INET6_NTOA(unhex('00000000000000000000000000000001'));
SELECT INET6_NTOA(unhex('7F000001'));

SELECT INET6_NTOA('');
SELECT INET6_NTOA(2130706433);
SELECT INET6_NTOA(null);

INET6_NTOA(unhex('FE800000000000008ADE7CFFFEF7E3A5'))
varchar(39) BINARY
fe80::8ade:7cff:fef7:e3a5
INET6_NTOA(unhex('2A023030081ED48DCD91E9725C6B90A8'))
varchar(39) BINARY
2a02:3030:81e:d48d:cd91:e972:5c6b:90a8
INET6_NTOA(unhex('00000000000000000000000000000001'))
varchar(39) BINARY
::1
INET6_NTOA(unhex('7F000001'))
varchar(39) BINARY
127.0.0.1
INET6_NTOA('')
varchar(39) BINARY
NULL
INET6_NTOA(2130706433)
varchar(39) BINARY
NULL
INET6_NTOA(null)
varchar(39) BINARY
NULL
The examples were created with the MyWAY SQL manager: Download

How to use the INET6_NTOA() function in MySQL and MariaDB databases

In MySQL and MariaDB the INET6_NTOA() function is used to convert an IPv6 address from its numeric representation to its textual form. The function takes a binary string representing the numeric IPv6 address as an argument and returns the corresponding IPv6 address in text format, for example for display purposes or to use in queries and to use comparisons where specific ranges of IPv6 addresses can be filtered or retrieved. String operations can also be performed in this way, or certain parts of the address can be extracted.
IFIFNULLINET6_ATONINET6_NTOAINET_ATONINET_NTOAINSERT

Further MySQL und MariaDB SQL Miscellaneous functions

BIN_TO_UUIDBIN_TO_UUID(Binary string [, Swap])
More about BIN_TO_UUID Function

GET_LOCKGET_LOCK()

INET6_ATONINET6_ATON(String)
More about INET6_ATON Function

INET_ATONINET_ATON(String)
More about INET_ATON Function

INET_NTOAINET_NTOA(Value)
More about INET_NTOA Function

IS_FREE_LOCKIS_FREE_LOCK()

IS_IPV4IS_IPV4(String)
More about IS_IPV4 Function

IS_IPV4_COMPATIS_IPV4_COMPAT(String)

IS_IPV4_MAPPEDIS_IPV4_MAPPED(String)

IS_IPV6IS_IPV6(String)
More about IS_IPV6 Function

IS_USED_LOCKIS_USED_LOCK()

IS_UUIDIS_UUID(String)
More about IS_UUID Function

MASTER_GTID_WAITMASTER_GTID_WAIT()

MASTER_POS_WAITMASTER_POS_WAIT()

NAME_CONSTNAME_CONST(Name, Value)
More about NAME_CONST Function

RELEASE_ALL_LOCKSRELEASE_ALL_LOCKS()

RELEASE_LOCKRELEASE_LOCK()

SYS_GUIDSYS_GUID()
More about SYS_GUID Function

UUIDUUID()
More about UUID Function

UUID_SHORTUUID_SHORT()
More about UUID_SHORT Function

UUID_TO_BINUUID_TO_BIN(String [, Swap])
More about UUID_TO_BIN Function

Numeric functionsString functionsRegular ExpressionsDate and Time functions
Comparison functionsEncryption & CompressionConversion functionsNULL functions
Aggregate functionsWindow functionsJSON functionsGeometric functions
Sequence functionsInformation functionsDynamic ColumnsMiscellaneous functions
More information about the INET6_NTOA SQL function: mysql.com and mariadb.com
Updated: 2025-11-04ImprintContactTerms & conditionsPrivacy & CookiesUpdatesSitemapFacebookLinkedin©2020-2025 Heino Cunze-Fischer