HTTP 204 No Content — What It Means

What HTTP status code 204 No Content means, when servers return it, and how to handle it correctly.

Published September 22, 2026

HTTP 204 No Content means the request succeeded and there is intentionally no response body. It is common for DELETE and for updates where the client needs no data back.

What it means

Browsers keep the current page when a form returns 204. The response must not include a body.

Common causes: DELETE succeeded; PUT or PATCH with nothing to return; Preflight or tracking endpoints.

On the wire

DELETE /users/7 HTTP/1.1
HTTP/1.1 204 No Content
(no body)
A typical 204 exchange.

Practical examples

Test it from the shell

curl -i https://example.com/path   # look for HTTP 204

Handling 204 in code or config

res.sendStatus(204)

How to fix it

Do not send a body with 204; Use 200 if the client needs the updated resource; Set no Content-Length body.

1. Reproduce: curl -i <url>
2. Confirm the status is 204
3. Apply the fix above and re-test

Common mistakes

  • Treating this as an error when it is a normal part of HTTP.
  • Use 200 if the client needs the updated resource
  • Ignoring the response headers that explain the details.

Key takeaways

  • 204 means No Content.
  • HTTP 204 No Content means the request succeeded and there is intentionally no response body.
  • Read the response headers and logs for the exact cause.

FAQ

Can 204 include JSON?

No, it must have no body.

Is 204 a client or server error?

It is a success status code, in the 2xx class.

More HTTP articles