HTTP status · 2xx — success

204 No Content

204 No Content means the request succeeded but there is no body to return.

Key facts

Class2xx — success
StandardRFC 9110 §15.3.5
Cacheable by defaultYes
BodyMust not be present
Typical methodsDELETE, PUT, PATCH

What 204 means

The server completed the request and deliberately returns no content. It is common after a DELETE, or after an update where the client does not need the new representation. Because there is no body, the response must not include Content-Length with a non-zero value or Transfer-Encoding; a 204 that carries a body confuses clients and proxies.

204 versus 200 with an empty body

Both can express “nothing to return”, but 204 is semantically stronger: it tells caches and clients not to expect content at all. Use 200 when the response is a representation that happens to be empty (for example an empty JSON array), and 204 when the operation itself produces nothing to show.

Frequently asked questions

Can a 204 response have a body?

No. The standard forbids content in a 204 response; clients may ignore it, and intermediaries may treat it as a protocol error.

Is 204 good for a DELETE request?

Yes. It is a common answer when the resource was removed and no further information is needed.

New tools, straight to your inbox

One short email when we add tools worth using. No spam, unsubscribe anytime.