Success · 2xx

204 No Content

The request succeeded and there is intentionally no response body.

What 204 No Content means

204 No Content is a successful response with an empty body. It is most commonly used for DELETE requests (the resource is gone, there is nothing to return), PUT requests that update a resource without returning a representation, and POST requests that trigger an action without producing a result. The response must not include a body, and most clients will skip body-parsing entirely on 204.

When servers should return it: Return 204 when the request succeeded and there is genuinely no body to send. Do not return 204 if the body is just empty by accident; use 200 with an empty JSON object in that case to avoid client confusion.

Example response

curl -i -X DELETE https://api.example.com/users/42

HTTP/2 204
date: Tue, 05 May 2026 14:00:00 GMT

Related status codes

Frequently Asked Questions

Can 204 have headers?
Yes. 204 forbids a body but allows any headers, including Cache-Control, ETag, and custom headers. Just no body bytes.
What if I want to return JSON?
Use 200, not 204. 204 is specifically the "no body" status code.
Do browsers handle 204 in fetch()?
Yes. response.body is null on 204. Calling response.json() on a 204 will throw, so check status before parsing.
Defined in: RFC 9110 · Class: 2xx Success

More references

For a one-page reference of all HTTP status codes, see the HTTP cheat sheet. For testing API responses, try the API Tester tool. For inspecting responses on the command line, the curl cheat sheet covers the most common flags.