Skip to main content
Node documentation

assert

The node:assert module provides a set of assertion functions for verifying invariants.

async_hooks

We strongly discourage the use of the async_hooks API. Other APIs that can cover most of its use cases include:

buffer

Buffer objects are used to represent a fixed-length sequence of bytes. Many Node.js APIs support Buffers.

child_process

The node:child_process module provides the ability to spawn subprocesses in a manner that is similar, but not identical, to popen(3). This capability is primarily provided by the spawn function:

console

The node:console module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers.

crypto

The node:crypto module provides cryptographic functionality that includes a set of wrappers for OpenSSL's hash, HMAC, cipher, decipher, sign, and verify functions.

dgram

The node:dgram module provides an implementation of UDP datagram sockets.

diagnostics_channel

The node:diagnostics_channel module provides an API to create named channels to report arbitrary message data for diagnostics purposes.

dns

The node:dns module enables name resolution. For example, use it to look up IP addresses of host names.

dns/promises

The dns.promises API provides an alternative set of asynchronous DNS methods that return Promise objects rather than using callbacks. The API is accessible via import { promises as dnsPromises } from 'node:dns' or import dnsPromises from 'node:dns/promises'.

events

Much of the Node.js core API is built around an idiomatic asynchronous event-driven architecture in which certain kinds of objects (called "emitters") emit named events that cause Function objects ("listeners") to be called.

fs

The node:fs module enables interacting with the file system in a way modeled on standard POSIX functions.

fs/promises

The fs/promises API provides asynchronous file system methods that return promises.

http

To use the HTTP server and client one must import the node:http module.

http2

The node:http2 module provides an implementation of the HTTP/2 protocol. It can be accessed using:

https

HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a separate module.

inspector/promises

The node:inspector/promises module provides an API for interacting with the V8 inspector.

net

Stability: 2 - Stable

os

The node:os module provides operating system-related utility methods and properties. It can be accessed using:

path

The node:path module provides utilities for working with file and directory paths. It can be accessed using:

perf_hooks

This module provides an implementation of a subset of the W3C Web Performance APIs as well as additional APIs for Node.js-specific performance measurements.

punycode

**The version of the punycode module bundled in Node.js is being deprecated. **In a future major version of Node.js this module will be removed. Users currently depending on the punycode module should switch to using the userland-provided Punycode.js module instead. For punycode-based URL encoding, see url.domainToASCII or, more generally, the WHATWG URL API.

querystring

The node:querystring module provides utilities for parsing and formatting URL query strings. It can be accessed using:

readline

The node:readline module provides an interface for reading data from a Readable stream (such as process.stdin) one line at a time.

stream

A stream is an abstract interface for working with streaming data in Node.js. The node:stream module provides an API for implementing the stream interface.

string_decoder

The node:string_decoder module provides an API for decoding Buffer objects into strings in a manner that preserves encoded multi-byte UTF-8 and UTF-16 characters. It can be accessed using:

test/reporters

The node:test/reporters module exposes the builtin-reporters for node:test. To access it:

timers

The timer module exposes a global API for scheduling functions to be called at some future period of time. Because the timer functions are globals, there is no need to import node:timers to use the API.

timers/promises

The timers/promises API provides an alternative set of timer functions that return Promise objects. The API is accessible via import timersPromises from 'node:timers/promises'.

tls

The node:tls module provides an implementation of the Transport Layer Security (TLS) and Secure Socket Layer (SSL) protocols that is built on top of OpenSSL. The module can be accessed using:

tty

The node:tty module provides the tty.ReadStream and tty.WriteStream classes. In most cases, it will not be necessary or possible to use this module directly. However, it can be accessed using:

url

The node:url module provides utilities for URL resolution and parsing. It can be accessed using:

util

The node:util module supports the needs of Node.js internal APIs. Many of the utilities are useful for application and module developers as well. To access it:

vm

The node:vm module enables compiling and running code within V8 Virtual Machine contexts.

worker_threads

The node:worker_threads module enables the use of threads that execute JavaScript in parallel. To access it:

zlib

The node:zlib module provides compression functionality implemented using Gzip, Deflate/Inflate, and Brotli.

Back to top