HTTP Status Codes Cheat Sheet

Complete reference of all HTTP status codes with descriptions, categories, and usage examples. Search and filter to find any code instantly.

100% client-side. Your data never leaves your browser.

Showing 63 status codes

In Laravel

Most of the time you do not set a status code by hand. Laravel has a helper for the ones you send yourself:

Status In Laravel
201 Createdresponse()->json($order, 201)
204 No Contentresponse()->noContent()
301 Moved PermanentlyRoute::permanentRedirect('/old', '/new')
302 Foundredirect()->route('dashboard') or Route::redirect()
404 Not Foundabort(404), or findOrFail() when the record is missing
410 Goneabort(410)

An API resource sets 201 for you when the model was created in the same request:

public function store(StoreOrderRequest $request): OrderResource
{
    $order = Order::create($request->validated());

    return new OrderResource($order); // 201, because the model is new
}

Some codes come from the framework, not from your code. Laravel sends 422 when validation fails on a JSON request, 429 when the throttle middleware limit is reached, and 503 while the app is in maintenance mode (php artisan down). It also sends 419, which is not a standard code. See the first question below.

Laravel 13.x docs: Redirect routes, Responses, Errors

Complete Reference

All standard HTTP status codes from 100 to 511, with clear descriptions and real-world usage notes.

Instant Search

Search by code number, name, or description. Filter by category to quickly find the code you need.

Color-Coded

Each category is color-coded for quick visual identification: blue, green, yellow, orange, and red.

Need something custom built?

I build custom Laravel tools, web apps, and SaaS platforms. If you need something beyond off-the-shelf, let's talk.

Contact

Frequently Asked Questions

Why does Laravel return 419 Page Expired?

419 means the CSRF check failed on a POST, PUT, PATCH or DELETE request. The usual causes: the form has no @csrf field, the session expired while the form was open, or the browser did not send the session cookie (check SESSION_DOMAIN and HTTPS settings).

For a webhook from a service like Stripe, exclude its route from the check in bootstrap/app.php. In Laravel 13 that is $middleware->preventRequestForgery(except: ['stripe/*']). In Laravel 11 and 12 it is validateCsrfTokens(except: [...]).

What is the difference between 401 and 403 in Laravel?

401 means the user is not logged in. 403 means the user is logged in but is not allowed. Laravel follows this: the auth middleware answers a JSON request from a guest with 401 and redirects a browser to the login page. A failed policy or gate check gives 403.

Is 410 better than 404 for a page I removed?

For people, 410 says the page is gone on purpose. For Google, there is no difference: its documentation says all 4xx codes except 429 are treated the same, and the URL drops out of the index. Use 410 when the removal is deliberate, and 404 for everything else.