Skip to main content
2xx Success

200 OK

The request succeeded. The result meaning depends on the HTTP method.

Meaning & Description

The HTTP `200 OK` success status response code indicates that the request has succeeded. A 200 response is cacheable by default.

The meaning of a success depends on the HTTP request method: - GET: The resource has been fetched and is transmitted in the message body. - HEAD: The representation headers are included in the response without any message body. - POST: The resource describing the result of the action is transmitted in the message body. - TRACE: The message body contains the request message as received by the server.

Common Causes

  • Normal, successful operation.

How to fix a 200 error

  1. No debugging required. This is the desired outcome.

Browser & SEO Behaviour

Browser Behavior

Browsers render the response body (HTML, images, etc.) or expose it to JavaScript via Fetch/XHR.

SEO Impact

Excellent. Google expects 200 OK for all canonical pages you want indexed.

Code Examples

Node.js (Express)
app.get('/api/users', (req, res) => {
  const users = [{ id: 1, name: 'Alice' }];
  // Express sends 200 OK by default when using res.send or res.json
  res.json(users);
});
Python (FastAPI)
@app.get("/api/users")
def get_users():
    # FastAPI returns 200 OK by default
    return [{"id": 1, "name": "Alice"}]

Raw HTTP Response Example

HTTP Response
HTTP/1.1 200 OK
Date: Mon, 23 May 2026 22:38:34 GMT
Content-Type: text/html; charset=UTF-8
Content-Length: 138

<html>...</html>

Frequently Asked Questions

Is 200 OK always the right response for success?

Not always. While 200 OK is the standard success response, you should use 201 Created when a resource has been successfully created (e.g., via POST), and 204 No Content when the request succeeded but there is no data to return.

Should I return 200 OK with an error message in the body?

No, this is an anti-pattern. If a request fails, you should return an appropriate 4xx or 5xx status code. Returning 200 OK for errors confuses clients and breaks caching and monitoring mechanisms.