# intToIp() function · @imqueue/net

Source: https://imqueue.org/api/net/latest/net.inttoip/
Published: 2026-08-01
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/net 3.0.2 — generated reference, not hand-written

Renders an integer address back to text.

**Signature:**

```typescript
export declare function intToIp(intIp: bigint, type: NetworkType, canonical?: boolean): string;
```

## Parameters


| Parameter | Type | Description |
| --- | --- | --- |
| intIp | bigint | the address as produced by [ipToInt()](https://imqueue.org/api/net/latest/net.iptoint/) |
| type | [NetworkType](https://imqueue.org/api/net/latest/net.networktype/) | which family to render it as; the integer alone does not say |
| canonical | boolean | _(Optional)_ for IPv6, emit the full expanded form instead of the compressed one. Ignored for IPv4, which has only one form. |


**Returns:**

string

Dotted-quad for IPv4, colon-hex for IPv6.

## Default Value

`canonical` defaults to `false`, i.e. compressed IPv6

## Remarks

The inverse of [ipToInt()](https://imqueue.org/api/net/latest/net.iptoint/), but `type` is not optional here and cannot be inferred: the same integer is a valid address in both families, so passing the wrong one yields a plausible, wrong address rather than an error.

There is no range check either. A value wider than the family renders from whatever bits fall in each group's position, so an IPv6-sized integer rendered as IPv4 silently produces nonsense.

