2xx Success · RFC 9110 §15.3.5

204 No Content

Success, and there is deliberately no response body.

What 204 means

The request worked and the server has nothing to send back. Common for DELETE, for PUT updates, and for beacon or heartbeat endpoints.

A 204 must not include a body; some frameworks send one anyway and clients then fail to parse an "empty" JSON response. Browsers do not navigate on a 204, which is why it is sometimes used for form posts that should leave the page as it is.

Common causes

  • A successful DELETE, an update that returns nothing, or a fire-and-forget POST.

How to fix it

  • If a client errors with "unexpected end of JSON input", it is parsing the empty body; check the status before parsing.

What it looks like

A typical response:

HTTP/1.1 204 No Content
Date: Thu, 10 Sep 2026 10:12:01 GMT

The same event in an nginx access log (the status is the number after the request line):

203.0.113.7 - - [10/Sep/2026:10:12:01 +0000] "GET /api/orders HTTP/1.1" 204 0 "-" "Mozilla/5.0"

Check it with curl

-i prints the status line and headers, and -w '%{http_code}' prints only the number, which is handy in scripts and health checks. Replace the URL with yours:

curl -sS -o /dev/null -w '%{http_code} %{time_total}s\n' https://example.com/api/orders

Compare what curl sees with what the browser sees. A different status from the same URL usually means a cache, a CDN edge or a cookie is in the way.

Investigating a run of 204s? Paste the log excerpt into Log Share to get line numbers, highlighting and an expiring link for whoever is on call with you.

  • 200OK: The request succeeded and the response carries the result.
  • 205Reset Content: success, and the client should reset the form or view.
  • 404Not Found: The server found no resource at that URL.

FAQ

Should DELETE return 204 or 200?

Either is correct. 204 when there is nothing to say; 200 with a body if you want to return the deleted representation or a confirmation object.