DD
DevDash

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

Open tool →

Frequently Asked Questions

Related Values

Want API access + no ads? Pro coming soon.