---
name: "curl_version"
section: "3"
platform: "macos"
package: "curl"
version: "166.0.0.0.1"
release: "macOS 26.5"
platforms: ["linux", "macos"]
url: "https://new.carta.tech/curl_version"
---

# curl\_version(3)

returns the libcurl version string

## NAME

curl\_version - returns the libcurl version string

## SYNOPSIS

```
#include <curl/curl.h>
char *curl_version();
```

## DESCRIPTION

Returns a human readable string with the version number of libcurl and some of its important components (like OpenSSL version).

We recommend using *[curl\_version\_info(3)](/curl_version_info/3.md)* instead!

## EXAMPLE

```
int main(void)
{
  printf("libcurl version %s\n", curl_version());
}
```

## AVAILABILITY

Always

## RETURN VALUE

A pointer to a null-terminated string. The string resides in a statically allocated buffer and must not be freed by the caller.

## SEE ALSO

[**curl\_version\_info**(3)](/curl_version_info/3.md)
