Start free · Free tools · Fair usage limits
Browse Tools

Categories

Custom AI Solutions – AI2Flows
LIVE NEWS
Loading latest AI & SEO news…
Home›Tools›HTTP Status Codes Reference›HTTP 204 No Content
2xx Success

HTTP 204 No Content

HTTP 204 No Content means the request succeeded but there is no response body to send. It is commonly returned after a successful DELETE, a PUT that saved…

Quick answer

HTTP 204 No Content means the request succeeded but there is no response body to send. It is commonly returned after a successful DELETE, a PUT that saved changes, or an analytics beacon. A 204 response must not include a body.

Last updated · Maintained by FreeAIToolz · How we test

What does HTTP 204 No Content mean?

Clients should not expect any content. Browsers that receive 204 for a navigation stay on the current page. Headers such as ETag can still be sent to describe the updated resource.

Status code204
NameNo Content
Class2xx Success
Defined inRFC 9110 §15.3.5
Cacheable by defaultYes (heuristically cacheable)
Safe to retry automatically?Not applicable

What causes HTTP 204?

  • A successful operation with nothing to return.

How do I fix HTTP 204?

  1. Do not send a body or a Content-Length greater than 0; some proxies treat that as a protocol error.
  2. If the client needs the updated object, return 200 with the body instead.

What should a client do after HTTP 204?

Treat as success. Do not try to parse JSON from the empty body (fetch(...).json() will throw).

Does HTTP 204 affect SEO?

Pages returning 204 have no content to index. Never use 204 for a public page.

Example 204 response

HTTP/1.1 204 No Content
Date: Mon, 01 Dec 2026 12:00:00 GMT

How to return 204 No Content in code

Express (Node.js)

res.status(204).end();

Next.js route handler

return new Response(null, { status: 204 });

FastAPI (Python)

return Response(status_code=204)

PHP

http_response_code(204);

Nginx

location = /example {
    return 204;
}

Other 2xx status codes

The request was received, understood and accepted.

Frequently asked questions

Why does response.json() fail on a 204?
There is no body to parse. Check response.status === 204 (or response.ok plus an empty body) before calling json().
204 or 200 after DELETE?
Both are valid. 204 is common when nothing needs to be returned; 200 if you return the deleted resource or a message.
Is 204 a client or server error?
Neither. 204 is in the 2xx Success class. The request was received, understood and accepted.