HTTP 204 No Content: What It Means and When You See It
Quick Answer
HTTP 204 No Content means the server successfully processed the request but is not returning any content. Common for DELETE requests or form submissions.
When HTTP 204 Is Used
HTTP 204 No Content means the server processed the request successfully but has nothing to send back. Common uses: DELETE (resource deleted, nothing to return), PUT or PATCH (resource updated, client already has the new state), form submissions (server accepted data, no redirect needed), and heartbeat endpoints. A 204 response must not include a message body - any Content-Length or Transfer-Encoding headers are ignored.
Implementing 204 in APIs
Express.js: res.sendStatus(204) sends a 204 with no body. For DELETE: app.delete("/users/:id", async (req, res) => { await db.users.delete(req.params.id); res.sendStatus(204); }). FastAPI: from fastapi import Response; return Response(status_code=204). In fetch(): const res = await fetch(url, { method: "DELETE" }); if (res.status === 204) { /* success, no body */ }. Do not call res.json() on a 204 response - there is no body to parse.
Try the interactive tool
Convert any value instantly — no sign-up required
Frequently Asked Questions
Related Values
100
HTTP 100 Continue means the server has received the request headers and the client should proceed to send the request body. It is an interim response used to inform the client to continue.
101
HTTP 101 Switching Protocols indicates the server is switching to the protocol specified in the Upgrade header field. Commonly used when upgrading to WebSocket connections.
200
HTTP 200 OK is the standard success response. The request has succeeded and the server has returned the requested resource in the response body.
201
HTTP 201 Created means the request succeeded and a new resource was created as a result. The Location header typically points to the new resource URL.