SiteError.comYour friendly guide to HTTP status codes
Status CodesBlog
  1. Home
  2. 2xx Success
  3. 204 No Content

204 No Content

🫥
204
No Content
✨
✨

Example HTTP Response

HTTP Response
HTTP/1.1 204 No Content
Common Causes
  • Successfully deleted a resource
  • Update that doesn't need to return data
  • Preflight CORS request succeeded
Technical Details

What does this mean?

Mission accomplished, but there's nothing to show for it. Like successfully deleting a file — it's gone, nothing to see here!

Technical Definition

The server successfully processed the request and is not returning any content.

RFC Says

"The 204 (No Content) status code indicates that the server has successfully fulfilled the request and that there is no additional content to send in the response payload body."

Plain English:

The operation succeeded, but there's nothing to send back. Commonly used for DELETE requests or PUT requests where you don't need to return the updated resource. The response should not include a message body.

Common Misinterpretation

Some developers use 200 with an empty body instead of 204. Use 204 when there's intentionally no content to return - it's more semantically correct and saves bandwidth by not requiring a Content-Length header or message body.

View RFC Documentation
Code Snippets

Ready-to-use code for returning this HTTP status in your application:

Node.js
// Express.js
app.get('/example', (req, res) => {
  res.status(204).json({
    error: 'No Content',
    message: 'Your error message here'
  });
});

// Native HTTP
const http = require('http');

http.createServer((req, res) => {
  res.writeHead(204, { 'Content-Type': 'application/json' });
  res.end(JSON.stringify({
    error: 'No Content',
    message: 'Your error message here'
  }));
}).listen(3000);

204 No Content FAQ

What causes a 204 No Content error?

Successfully deleted a resource. Update that doesn't need to return data. Preflight CORS request succeeded.

203 Non-Authoritative Information205 Reset Content

Popular Status Codes

  • 200 OK
  • 301 Moved Permanently
  • 302 Found
  • 400 Bad Request
  • 401 Unauthorized
  • 403 Forbidden
  • 404 Not Found
  • 500 Internal Server Error
  • 502 Bad Gateway
  • 503 Service Unavailable

Compare Codes

  • 401 vs 403
  • 301 vs 302
  • 404 vs 410
  • 500 vs 502
  • Compare any codes →

Categories

  • Informational
  • Success
  • Redirection
  • Client Error
  • Server Error
  • NGINX
  • Cloudflare
  • AWS ELB
  • Microsoft IIS

Tools

  • Cheat Sheet
  • Status Code Quiz
  • URL Checker
  • API Playground
  • Blog

© 2026 SiteError.com. All rights reserved.