Available inall subroutines.

Converts the string addr to an IP address (IPv4 or IPv6). If conversion fails, fallback will be returned.

The string must be a numeric IP address representation in the standard format, such as or 2001:db8::1. This function does not support looking up an IP address by name.

We recommend using a fallback IP address that's meaningful for your particular Fastly service.

The inverse conversion is available as std.ip2str.


if (std.str2ip("", "") ~ my_acl) {

User contributed notes


Do you see an error in this page? Do you have an interesting use case, example or edge case people should know about? Share your knowledge and help people who are reading this page! (Comments are moderated; for support, please contact Fastly support)