---
name: "intN_t"
section: "3type"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/intN_t/3type"
---

# intN\_t(3type)

fixed-width basic integer types

## NAME

intN\_t, int8\_t, int16\_t, int32\_t, int64\_t, uintN\_t, uint8\_t, uint16\_t, uint32\_t, uint64\_t - fixed-width basic integer types

## LIBRARY

Standard C library (*libc*)

## SYNOPSIS

```
#include <stdint.h>
```

**typedef** /\* ... \*/ **int8\_t;** **typedef** /\* ... \*/ **int16\_t;** **typedef** /\* ... \*/ **int32\_t;** **typedef** /\* ... \*/ **int64\_t;**

**typedef** /\* ... \*/ **uint8\_t;** **typedef** /\* ... \*/ **uint16\_t;** **typedef** /\* ... \*/ **uint32\_t;** **typedef** /\* ... \*/ **uint64\_t;**

**#define INT8\_WIDTH   8** **#define INT16\_WIDTH  16** **#define INT32\_WIDTH  32** **#define INT64\_WIDTH  64**

**#define UINT8\_WIDTH  8** **#define UINT16\_WIDTH 16** **#define UINT32\_WIDTH 32** **#define UINT64\_WIDTH 64**

**#define INT8\_MAX**     /\*  2\*\*(INT8\_WIDTH - 1) - 1   \*/ **#define INT16\_MAX**    /\*  2\*\*(INT16\_WIDTH - 1) - 1  \*/ **#define INT32\_MAX**    /\*  2\*\*(INT32\_WIDTH - 1) - 1  \*/ **#define INT64\_MAX**    /\*  2\*\*(INT64\_WIDTH - 1) - 1  \*/

**#define INT8\_MIN**     /\*  - 2\*\*(INT8\_WIDTH - 1)     \*/ **#define INT16\_MIN**    /\*  - 2\*\*(INT16\_WIDTH - 1)    \*/ **#define INT32\_MIN**    /\*  - 2\*\*(INT32\_WIDTH - 1)    \*/ **#define INT64\_MIN**    /\*  - 2\*\*(INT64\_WIDTH - 1)    \*/

**#define UINT8\_MAX**    /\*  2\*\*INT8\_WIDTH - 1         \*/ **#define UINT16\_MAX**   /\*  2\*\*INT16\_WIDTH - 1        \*/ **#define UINT32\_MAX**   /\*  2\*\*INT32\_WIDTH - 1        \*/ **#define UINT64\_MAX**   /\*  2\*\*INT64\_WIDTH - 1        \*/

**#define INT8\_C(***c***)**    *c* **##** */\* ... \*/* **#define INT16\_C(***c***)**   *c* **##** */\* ... \*/* **#define INT32\_C(***c***)**   *c* **##** */\* ... \*/* **#define INT64\_C(***c***)**   *c* **##** */\* ... \*/*

**#define UINT8\_C(***c***)**   *c* **##** */\* ... \*/* **#define UINT16\_C(***c***)**  *c* **##** */\* ... \*/* **#define UINT32\_C(***c***)**  *c* **##** */\* ... \*/* **#define UINT64\_C(***c***)**  *c* **##** */\* ... \*/*

## DESCRIPTION

*int*N*\_t* are signed integer types of a fixed width of exactly N bits, *N* being the value specified in its type name. They are be capable of storing values in the range \[**INT***N***\_MIN**, **INT***N***\_MAX**\], substituting *N* by the appropriate number.

*uint*N*\_t* are unsigned integer types of a fixed width of exactly N bits, N being the value specified in its type name. They are capable of storing values in the range \[**0**, **UINT***N***\_MAX**\], substituting *N* by the appropriate number.

According to POSIX, \[*u*\]*int8\_t*, \[*u*\]*int16\_t*, and \[*u*\]*int32\_t* are required; \[*u*\]*int64\_t* are only required in implementations that provide integer types with width 64; and all other types of this form are optional.

The macros \[**U**\]**INT***N***\_WIDTH** expand to the width in bits of these types (*N*).

The macros \[**U**\]**INT***N***\_MAX** expand to the maximum value that these types can hold.

The macros **INT***N***\_MIN** expand to the minimum value that these types can hold.

The macros \[**U**\]**INT***N***\_C**() expand their argument to an integer constant of type \[*u*\]*int*N*\_t*.

The length modifiers for the \[*u*\]*int*N*\_t* types for the [**printf**(3)](/printf/3.md) and [**scanf**(3)](/scanf/3.md) families of functions are **w***N*, resulting for example in **%w64d** or **%w64i** for printing or scanning *int64\_t* values.

## STANDARDS

C23, POSIX.1-2024.

## HISTORY

- \[*u*\]*int*N*\_t*

  C99, SUSv2, POSIX.1-2001.

- \[**U**\]**INT***N***\_MAX** **INT***N***\_MIN** \[**U**\]**INT***N***\_C**()

  C99, POSIX.1-2001.

- \[**U**\]**INT***N***\_WIDTH**

  C23.

Initially, SUSv2 did not include *\<stdint.h\>* as a standard header. The \[*u*\]*int*N*\_t* types were instead defined in *\<inttypes.h\>*. This was remedied in POSIX.1-2001.

## NOTES

The following header also provides these types: *\<inttypes.h\>*. *\<arpa/inet.h\>* also provides *uint16\_t* and *uint32\_t*.

## SEE ALSO

[**intmax\_t**(3type)](/intmax_t/3type.md), [**intptr\_t**(3type)](/intptr_t/3type.md), [**printf**(3)](/printf/3.md)
