Express.js express() Methods Reference

Last Updated : 18 Aug, 2026

Express.js provides several built-in methods and middleware functions that simplify request handling, routing, serving static files, and parsing request bodies. This reference lists the commonly used express() methods along with their purpose.

Express.js express() Methods:

Method

Description

Express.js express.json() Function

The express.json() function is a built-in middleware function in Express. It parses incoming requests with JSON payloads and is based on body-parser.

Express.js express.raw() Function

The express.raw() function is a built-in middleware function in Express. It parses incoming request payloads into a Buffer and is based on body-parser

Express.js express.Router() Function

The express.Router() function is used to create a new router object. This function is used when you want to create a new router object in your program to handle requests.

Express.js express.static() Function

The express.static() function is a built-in middleware function in Express. It serves static files and is based on serve-static.

Express.js express.text() Function

The express.text() function is a built-in middleware function in Express. It parses the incoming request payloads into a string and is based on body-parser.

Express.js express.urlencoded() Function

The express.urlencoded() function is a built-in middleware function in Express. It parses incoming requests with URL-encoded payloads and is based on a body parser.

Comment