-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhttp-status.html
More file actions
784 lines (726 loc) · 60.1 KB
/
Copy pathhttp-status.html
File metadata and controls
784 lines (726 loc) · 60.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HTTP Status Codes — 1xx to 5xx Reference | FreeDevTool</title>
<meta name="description" content="Complete HTTP status codes reference — 1xx, 2xx, 3xx, 4xx, 5xx with examples and RFC 9110 explanations. Searchable, browser-only.">
<meta name="robots" content="index, follow">
<meta name="author" content="Anees Ur Rehman">
<script type="application/ld+json">{"@context":"https://schema.org","@type":"WebPage","datePublished":"2026-05-02","dateModified":"2026-05-19","inLanguage":"en-US","isPartOf":{"@type":"WebSite","name":"FreeDevTool","url":"https://freedevtool.org"}}</script>
<script type="application/ld+json">{"@context":"https://schema.org","@type":"Person","name":"Anees Ur Rehman","url":"https://freedevtool.org/about","jobTitle":"Full-stack developer","worksFor":{"@type":"Organization","name":"FreeDevTool","url":"https://freedevtool.org"}}</script>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "HowTo",
"name": "How to look up HTTP status codes by number or category",
"description": "Search any HTTP status code (100-511) and see its meaning, RFC reference, common use case, and example response.",
"step": [
{"@type":"HowToStep","name":"Search by code or keyword","text":"Type the status code (e.g., 404) or keyword (e.g., 'unauthorized') in the search box to filter live."},
{"@type":"HowToStep","name":"Browse by category","text":"Or browse 5 categories: 1xx Informational, 2xx Success, 3xx Redirect, 4xx Client Error, 5xx Server Error."},
{"@type":"HowToStep","name":"Read the spec context","text":"Each code shows the RFC reference (mostly RFC 9110), description, and a real-world example response."},
{"@type":"HowToStep","name":"Use in your API","text":"Copy the code and use in your API response — match status to outcome (200 for OK, 201 for Created, 204 for No Content, etc.)."}
]
}
</script>
<link rel="canonical" href="https://freedevtool.org/http-status">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="preload" href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=DM+Sans:wght@300;400;500;600&display=swap" as="style">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=DM+Sans:wght@300;400;500;600&display=swap">
<link rel="preload" href="style.css?v=20260502-cards" as="style">
<link rel="stylesheet" href="style.css?v=20260502-cards">
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="/favicon.svg">
<meta property="og:image" content="https://freedevtool.org/og-image.svg">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:image:alt" content="FreeDevTool — 50+ free, fast, privacy-first developer tools">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="https://freedevtool.org/og-image.svg">
<meta name="twitter:title" content="HTTP Status Codes Reference — 1xx to 5xx | FreeDevTool">
<meta name="twitter:description" content="Complete HTTP status code reference with descriptions, use cases & examples. RFC 9110 compliant. Searchable.">
<meta property="og:image" content="https://freedevtool.org/og-image.svg">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta name="twitter:image" content="https://freedevtool.org/og-image.svg">
<script async src="https://www.googletagmanager.com/gtag/js?id=G-3L0CMH3X36"></script>
<script>window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments)}gtag('js',new Date());gtag('config','G-3L0CMH3X36');</script>
<meta property="og:title" content="HTTP Status Codes Reference — Complete List with Examples">
<meta property="og:description" content="Complete HTTP response codes reference. Search, filter and learn all status codes from 100 to 511.">
<meta property="og:type" content="website">
<meta property="og:url" content="https://freedevtool.org/http-status">
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"WebApplication","name":"HTTP Status Codes Reference","url":"https://freedevtool.org/http-status","description":"Complete HTTP status codes reference with descriptions, examples and use cases for developers.","applicationCategory":"DeveloperApplication","operatingSystem":"Any","offers":{"@type":"Offer","price":"0","priceCurrency":"USD"}}
</script>
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"FAQPage","mainEntity":[{"@type":"Question","name":"What are HTTP status codes and why are they important?","acceptedAnswer":{"@type":"Answer","text":"HTTP status codes are three-digit numbers returned by a server in response to a client request, defined in RFC 7231. They fall into five categories: 1xx (informational), 2xx (success), 3xx (redirection), 4xx (client error), and 5xx (server error). Understanding them is essential for debugging APIs, configuring web servers, handling errors in frontend code, and SEO optimization."}},{"@type":"Question","name":"What is the difference between 301 and 302 redirects?","acceptedAnswer":{"@type":"Answer","text":"A 301 (Moved Permanently) tells browsers and search engines the resource has permanently moved to a new URL. Search engines transfer SEO ranking to the new URL. A 302 (Found) indicates a temporary redirect — the original URL should still be indexed. Using the wrong redirect type can negatively impact SEO rankings."}},{"@type":"Question","name":"Which HTTP status codes should I use in my REST API?","acceptedAnswer":{"@type":"Answer","text":"Common REST API status codes: 200 OK (successful GET/PUT), 201 Created (successful POST), 204 No Content (successful DELETE), 400 Bad Request (invalid input), 401 Unauthorized (missing auth), 403 Forbidden (insufficient permissions), 404 Not Found (resource missing), 409 Conflict (duplicate resource), 422 Unprocessable Entity (validation error), 500 Internal Server Error (unexpected failure)."}},{"@type":"Question","name":"When should I use 401 vs 403?","acceptedAnswer":{"@type":"Answer","text":"Return 401 Unauthorized when the request has no credentials or invalid credentials — the client should authenticate. Return 403 Forbidden when the client is correctly authenticated but lacks permission for this resource — authentication will not help; permission must change."}},{"@type":"Question","name":"What is the difference between 200 and 204?","acceptedAnswer":{"@type":"Answer","text":"200 OK indicates success with a response body. 204 No Content indicates success but the response is intentionally empty. Use 204 for DELETE operations or PATCH operations where the new state is implicit."}},{"@type":"Question","name":"What is the difference between 307 and 308 redirects?","acceptedAnswer":{"@type":"Answer","text":"Both preserve the HTTP method (POST stays POST). 307 Temporary Redirect indicates short-term — clients keep using the original URL. 308 Permanent Redirect indicates permanent — clients and search engines update bookmarks/indexes."}}]}
</script>
<style>
.http-search{position:relative;margin-bottom:20px}
.http-search input{width:100%;padding:12px 16px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);color:var(--text);font-family:var(--mono);font-size:14px}
.http-search input:focus{border-color:var(--accent);outline:none;box-shadow:0 0 0 3px rgba(0,208,132,.08)}
.http-filters{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:20px}
.http-filters button{padding:6px 14px;font-size:12px;font-family:var(--mono);background:var(--bg4);border:1px solid var(--border);border-radius:20px;color:var(--text2);cursor:pointer;transition:all .2s}
.http-filters button:hover,.http-filters button.active{border-color:var(--accent);color:var(--accent);background:var(--accent-dim)}
.http-list{display:grid;gap:8px}
.http-item{background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:14px 18px;cursor:pointer;transition:all .2s;display:grid;grid-template-columns:70px 1fr;gap:12px;align-items:start}
.http-item:hover{border-color:rgba(0,208,132,.3);transform:translateX(2px)}
.http-code{font-family:var(--mono);font-size:18px;font-weight:700;border-radius:6px;padding:4px 0;text-align:center}
.http-1xx .http-code{color:#60a5fa}
.http-2xx .http-code{color:#4ade80}
.http-3xx .http-code{color:#facc15}
.http-4xx .http-code{color:#fb923c}
.http-5xx .http-code{color:#f87171}
.http-name{font-size:14px;font-weight:600;color:var(--text)}
.http-desc{font-size:12px;color:var(--text2);margin-top:4px;line-height:1.5}
.http-use{font-size:11px;color:var(--text3);margin-top:6px;font-family:var(--mono);display:none}
.http-item.open .http-use{display:block}
.http-count{font-size:12px;color:var(--text3);font-family:var(--mono);margin-bottom:16px}
</style>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [
{
"@type": "ListItem",
"position": 1,
"name": "Home",
"item": "https://freedevtool.org/"
},
{
"@type": "ListItem",
"position": 2,
"name": "All Tools",
"item": "https://freedevtool.org/all-tools"
},
{
"@type": "ListItem",
"position": 3,
"name": "HTTP Status Codes Reference",
"item": "https://freedevtool.org/http-status"
}
]
}
</script>
<script src="/ga4-events.js" defer></script>
</head>
<body>
<nav>
<a class="nav-logo" href="/" aria-label="FreeDevTool home"><svg class="logo-mark" width="22" height="22" viewBox="0 0 24 24" aria-hidden="true" fill="none"><rect x="1" y="1" width="22" height="22" rx="6" fill="currentColor" opacity=".12"/><path d="M9.5 8.5L6 12l3.5 3.5M14.5 8.5L18 12l-3.5 3.5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>FreeDevTool</a>
<div class="nav-links">
<div class="nav-dropdown" id="tools-dropdown">
<a href="all-tools" onclick="event.preventDefault();this.parentElement.classList.toggle('open')" aria-haspopup="true">Tools <svg class="chev" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="6 9 12 15 18 9"/></svg></a>
<div class="nav-dropdown-menu">
<a href="encoding-tools">
<div class="dd-icon">b64</div>
<div class="dd-info"><div class="dd-name">Encoding & Conversion</div><div class="dd-count">11 tools · Base64, YAML, px→rem</div></div>
</a>
<a href="generation-tools">
<div class="dd-icon">{ }</div>
<div class="dd-info"><div class="dd-name">Generation & Formatting</div><div class="dd-count">16 tools · JSON, SQL, gradients</div></div>
</a>
<a href="security-tools">
<div class="dd-icon">#</div>
<div class="dd-info"><div class="dd-name">Security & Hashing</div><div class="dd-count">3 tools · JWT, MD5, SHA</div></div>
</a>
<a href="text-tools">
<div class="dd-icon">.*</div>
<div class="dd-info"><div class="dd-name">Code & Text Tools</div><div class="dd-count">9 tools · Regex, diff, tokens</div></div>
</a>
<a href="devops-tools">
<div class="dd-icon">JS</div>
<div class="dd-info"><div class="dd-name">Optimization & DevOps</div><div class="dd-count">7 tools · Minifiers, cURL, git</div></div>
</a>
<a href="network-tools">
<div class="dd-icon">IP</div>
<div class="dd-info"><div class="dd-name">Network & Time</div><div class="dd-count">4 tools · IP, DNS, timestamps</div></div>
</a>
<a href="seo-tools">
<div class="dd-icon">SEO</div>
<div class="dd-info"><div class="dd-name">SEO & Meta Tools</div><div class="dd-count">3 tools · OG, meta, slug</div></div>
</a>
<div class="nav-dropdown-divider"></div>
<a class="dd-all" href="all-tools">
<div class="dd-icon">All</div>
<div class="dd-info"><div class="dd-name">Browse all 50 tools</div><div class="dd-count">Searchable catalog & categories</div></div>
</a>
</div>
</div>
<a href="/guides">Guides</a>
<a href="about">About</a>
<a href="privacy">Privacy</a>
</div>
</nav>
<div class="wrapper">
<section class="tool-header">
<a class="tool-back" href="/" aria-label="Back to home">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M15 18l-6-6 6-6"/></svg>
Back
</a>
<span class="tool-badge">Reference</span>
<h1>HTTP Status Codes Reference — Complete 1xx to 5xx List</h1>
<p>Complete list of HTTP response status codes with descriptions, use cases, and real-world examples. Search by code number or keyword to find what you need for API development, debugging, and server configuration. Aligned with <a href="https://datatracker.ietf.org/doc/html/rfc9110" rel="noopener" style="color:var(--accent)">RFC 9110</a> (HTTP Semantics, 2022) — the current authoritative HTTP standard.</p>
<div class="last-updated">Last updated: May 2026 · Written by <a href="/about">Anees Ur Rehman</a>, full-stack developer</div>
</section>
<div class="tool-card">
<div class="card-dots"><span></span><span></span><span></span></div>
<div class="tool-body">
<div class="http-search">
<input type="text" id="http-search" placeholder="Search by code number or keyword — e.g. 404, redirect, unauthorized..." autocomplete="off">
</div>
<div class="http-filters">
<button class="active" onclick="filterCodes('all',this)">All</button>
<button onclick="filterCodes('1',this)">1xx Info</button>
<button onclick="filterCodes('2',this)">2xx Success</button>
<button onclick="filterCodes('3',this)">3xx Redirect</button>
<button onclick="filterCodes('4',this)">4xx Client Error</button>
<button onclick="filterCodes('5',this)">5xx Server Error</button>
</div>
<div class="http-count" id="http-count"></div>
<div class="http-list" id="http-list"></div>
</div>
</div>
<!-- =============================================================
LONG-FORM ARTICLE — comprehensive guide for E-E-A-T + ranking.
============================================================= -->
<article>
<p class="aeo-lead" style="font-size:16px;line-height:1.7;color:var(--text);max-width:760px;margin:24px auto 18px;padding:0 4px">
<strong>HTTP status codes</strong> are 3-digit numbers servers return in responses to indicate the result: 2xx success, 3xx redirect, 4xx client error, 5xx server error. Common confusions include 401 vs 403 (unauthenticated vs forbidden), 422 vs 400 (semantically invalid vs malformed), and 301 vs 308 (redirect can change method vs preserves method). This <strong>free HTTP status reference</strong> documents all standard codes with common confusions explained.
</p>
<section id="examples" style="max-width:760px;margin:24px auto 32px">
<h2 style="font-size:18px;margin-bottom:14px">Examples</h2>
<div style="background:var(--bg3);border:1px solid var(--border);border-radius:var(--radius);padding:16px;margin-bottom:12px">
<strong style="display:block;color:var(--accent);font-family:var(--mono);font-size:11px;text-transform:uppercase;letter-spacing:1px;margin-bottom:6px">Confusing pair: 401 vs 403§§401 Unauthorized — server does not know who you are (no credentials or invalid). Typical fix: log in / refresh token.§§403 Forbidden — server knows who you are, you do not have permission. Typical fix: contact admin.</strong>
</div>
<div style="background:var(--bg3);border:1px solid var(--border);border-radius:var(--radius);padding:16px;margin-bottom:12px">
<strong style="display:block;color:var(--accent);font-family:var(--mono);font-size:11px;text-transform:uppercase;letter-spacing:1px;margin-bottom:6px">Confusing pair: 301 vs 308§§301 Moved Permanently — search engines treat as permanent. Method can change (POST may become GET on redirect).§§308 Permanent Redirect — method MUST be preserved. POST stays POST.</strong>
</div>
<div style="background:var(--bg3);border:1px solid var(--border);border-radius:var(--radius);padding:16px;margin-bottom:12px">
<strong style="display:block;color:var(--accent);font-family:var(--mono);font-size:11px;text-transform:uppercase;letter-spacing:1px;margin-bottom:6px">Often-misused: 422§§422 Unprocessable Entity — request is syntactically valid but semantically wrong (e.g. JSON parses correctly, but the email field is not an email). 400 Bad Request is for parse errors; 422 is for validation failures.</strong>
</div>
</section>
<aside class="founder-note" style="max-width:760px;margin:24px auto 32px;padding:20px 24px;background:rgba(0,208,132,0.05);border-left:3px solid var(--accent);border-radius:6px;font-size:14px;line-height:1.7;color:var(--text2)"><div style="font-family:var(--mono);font-size:11px;color:var(--accent);letter-spacing:1.5px;text-transform:uppercase;margin-bottom:10px;font-weight:600">💡 Why I built this</div><p style="margin:0 0 12px">I built this because I genuinely cannot remember the difference between 401 and 403 without looking it up. (401 means ‘I do not know who you are’, 403 means ‘I know who you are, you cannot have this’.) Or 422 vs 400, or whether 204 returns a body. This reference is searchable, includes the common confusions explicitly, and links to the RFC for each. Useful when designing API contracts.</p><p style="margin:0;font-size:13px;color:var(--text3)">— <a href="/about" style="color:var(--accent);text-decoration:none">Anees Ur Rehman</a>, full-stack developer</p></aside>
<section class="article-section">
<h2>What are HTTP status codes?</h2>
<p><strong>HTTP status codes</strong> are three-digit numerical responses servers send to clients to communicate the outcome of an HTTP request. They are the universal language of the web: <code>200 OK</code> means success, <code>404 Not Found</code> means the resource doesn't exist, <code>500 Internal Server Error</code> means something broke server-side. The current authoritative spec is <a href="https://datatracker.ietf.org/doc/html/rfc9110" rel="noopener">RFC 9110</a> ("HTTP Semantics", 2022), which consolidates and supersedes RFC 2616, RFC 7230–7235, and several others.</p>
<p>Status codes split into five families based on the first digit:</p>
<table class="ref-table">
<thead><tr><th>Class</th><th>Range</th><th>Meaning</th><th>Action by client</th></tr></thead>
<tbody>
<tr><td><strong>1xx Informational</strong></td><td>100–199</td><td>Provisional response — request received, processing</td><td>Wait for final response</td></tr>
<tr><td><strong>2xx Success</strong></td><td>200–299</td><td>Request succeeded</td><td>Render / consume response</td></tr>
<tr><td><strong>3xx Redirection</strong></td><td>300–399</td><td>Further action needed (usually a different URL)</td><td>Follow the redirect</td></tr>
<tr><td><strong>4xx Client error</strong></td><td>400–499</td><td>Client sent something invalid or unauthorized</td><td>Fix the request, do not retry blindly</td></tr>
<tr><td><strong>5xx Server error</strong></td><td>500–599</td><td>Server failed to fulfill a valid request</td><td>Retry with backoff; the server is at fault</td></tr>
</tbody>
</table>
<p>Why this matters: every layer of the modern web — browsers, CDNs, proxies, load balancers, monitoring systems, search engines — relies on status codes to make decisions. Send the wrong code and Google deindexes you, Cloudflare caches errors, retries hammer your servers, and users see broken UI.</p>
</section>
<section class="article-section">
<h2>The 12 most important HTTP status codes you'll actually use</h2>
<table class="ref-table">
<thead><tr><th>Code</th><th>Name</th><th>Use when</th></tr></thead>
<tbody>
<tr><td><strong>200</strong></td><td>OK</td><td>Successful GET, successful PUT/PATCH that updated</td></tr>
<tr><td><strong>201</strong></td><td>Created</td><td>Successful POST that created a resource. Include <code>Location:</code> header.</td></tr>
<tr><td><strong>204</strong></td><td>No Content</td><td>Successful DELETE, or successful PUT with no body to return</td></tr>
<tr><td><strong>301</strong></td><td>Moved Permanently</td><td>URL changed forever. Search engines transfer SEO equity. Update bookmarks.</td></tr>
<tr><td><strong>302 / 307</strong></td><td>Found / Temporary Redirect</td><td>Temporary redirect. SEO equity stays on the original URL.</td></tr>
<tr><td><strong>304</strong></td><td>Not Modified</td><td>Conditional GET — client's cache is still valid. No body.</td></tr>
<tr><td><strong>400</strong></td><td>Bad Request</td><td>Malformed JSON, missing required field, type mismatch</td></tr>
<tr><td><strong>401</strong></td><td>Unauthorized</td><td>Missing or expired authentication. The user has NOT proven who they are.</td></tr>
<tr><td><strong>403</strong></td><td>Forbidden</td><td>Authenticated, but lacks permission for this resource</td></tr>
<tr><td><strong>404</strong></td><td>Not Found</td><td>Resource doesn't exist. Most-recognized error code in the world.</td></tr>
<tr><td><strong>409</strong></td><td>Conflict</td><td>State conflict — duplicate slug, version mismatch, simultaneous edit</td></tr>
<tr><td><strong>422</strong></td><td>Unprocessable Entity</td><td>Syntactically valid request but semantically invalid (validation failed)</td></tr>
<tr><td><strong>429</strong></td><td>Too Many Requests</td><td>Rate-limited. Include <code>Retry-After:</code> header.</td></tr>
<tr><td><strong>500</strong></td><td>Internal Server Error</td><td>Unhandled exception. Don't leak stack traces to users.</td></tr>
<tr><td><strong>502</strong></td><td>Bad Gateway</td><td>Upstream service (the API your server proxies to) failed</td></tr>
<tr><td><strong>503</strong></td><td>Service Unavailable</td><td>Server is overloaded or down for maintenance</td></tr>
<tr><td><strong>504</strong></td><td>Gateway Timeout</td><td>Upstream service didn't respond in time</td></tr>
</tbody>
</table>
</section>
<section class="article-section">
<h2>301 vs 302 vs 307 vs 308 — the redirect maze</h2>
<p>Four codes cover redirects. Picking the wrong one breaks SEO, breaks form re-submission, or both.</p>
<table class="ref-table">
<thead><tr><th>Code</th><th>Permanent?</th><th>Method preserved?</th><th>SEO transfers?</th><th>When to use</th></tr></thead>
<tbody>
<tr><td><strong>301</strong> Moved Permanently</td><td>Yes</td><td>Browsers may change POST → GET (legacy)</td><td>Yes — > 99% in 2026</td><td>Permanent URL changes (site migrations, slug changes)</td></tr>
<tr><td><strong>302</strong> Found</td><td>No</td><td>Browsers may change POST → GET (legacy)</td><td>No</td><td>Temporary redirect, A/B tests, geo-routing</td></tr>
<tr><td><strong>307</strong> Temporary Redirect</td><td>No</td><td>Yes — POST stays POST</td><td>No</td><td>Modern temporary redirect when you need to preserve method/body</td></tr>
<tr><td><strong>308</strong> Permanent Redirect</td><td>Yes</td><td>Yes — POST stays POST</td><td>Yes</td><td>Modern permanent redirect when method preservation matters</td></tr>
</tbody>
</table>
<h3>The "POST → GET" gotcha (301/302 only)</h3>
<p>Historically, browsers were inconsistent about whether to change a POST to a GET when following a 301 or 302. Most modern browsers preserve the method, but some legacy tools don't. <strong>Use 307/308 if method preservation matters.</strong> For plain URL redirects (which are the common case), 301 is still the right answer in 2026 — Google fully understands it transfers SEO equity, and ~all browsers handle it correctly.</p>
<div class="article-aside">
<strong>SEO rule:</strong> if a URL change is permanent, use 301. Period. 302 is for A/B tests, geo-redirects, or maintenance — not for "I changed my mind about the URL." Wrong choice fragments your link equity.
</div>
</section>
<section class="article-section">
<h2>401 vs 403 — Unauthorized vs Forbidden</h2>
<p>Confused constantly. They mean different things:</p>
<h3>401 Unauthorized — "Who are you?"</h3>
<p>The client has NOT successfully authenticated. Either the credentials are missing entirely or invalid. The expected client behavior: prompt for login, retry with credentials.</p>
<ul>
<li>Missing <code>Authorization</code> header</li>
<li>Expired JWT</li>
<li>Invalid API key</li>
<li>Wrong username/password</li>
</ul>
<p>The response should include a <code>WWW-Authenticate</code> header indicating the auth scheme (Bearer, Basic, etc.).</p>
<h3>403 Forbidden — "I know who you are, you can't do this"</h3>
<p>The client IS authenticated but lacks permission. No amount of re-authentication will help — they need different permissions.</p>
<ul>
<li>Read-only API key trying to POST</li>
<li>Free-tier user accessing premium endpoint</li>
<li>Admin route accessed by non-admin user</li>
<li>IP-based geo-blocking ("Sorry, not available in your region")</li>
</ul>
<p><strong>Mnemonic:</strong> 401 = "Authenticate yourself." 403 = "Authentication accepted; access still denied."</p>
</section>
<section class="article-section">
<h2>200 vs 201 vs 204 — the success codes</h2>
<p>For REST APIs, picking the right success code communicates intent:</p>
<table class="ref-table">
<thead><tr><th>Code</th><th>HTTP method</th><th>Body</th><th>Example</th></tr></thead>
<tbody>
<tr><td><strong>200 OK</strong></td><td>GET, PUT, PATCH</td><td>The current state of the resource</td><td><code>GET /users/42</code> → user JSON</td></tr>
<tr><td><strong>201 Created</strong></td><td>POST</td><td>The new resource (or just <code>Location:</code>)</td><td><code>POST /users</code> → 201 + <code>Location: /users/43</code></td></tr>
<tr><td><strong>202 Accepted</strong></td><td>POST/PUT (async)</td><td>Job ID or status URL</td><td><code>POST /reports/generate</code> → 202 (job queued)</td></tr>
<tr><td><strong>204 No Content</strong></td><td>DELETE, PUT (no body)</td><td>Empty</td><td><code>DELETE /users/42</code> → 204</td></tr>
<tr><td><strong>206 Partial Content</strong></td><td>GET with Range</td><td>Requested byte range</td><td>Video streaming, resumable downloads</td></tr>
</tbody>
</table>
</section>
<section class="article-section">
<h2>4xx vs 5xx in practice — who do you blame?</h2>
<h3>4xx codes blame the client</h3>
<p>"You did something wrong." 4xx codes should NOT be retried automatically — retrying with the same input gets the same error. The client must change the request. Common 4xx in monitoring dashboards:</p>
<ul>
<li><strong>400</strong> — malformed JSON, validation failed</li>
<li><strong>401</strong> — token expired (very common — auto-refresh tokens to handle gracefully)</li>
<li><strong>403</strong> — permission denied</li>
<li><strong>404</strong> — typo in URL, deleted resource, dynamic 404 from your CMS</li>
<li><strong>410 Gone</strong> — explicitly deleted, will never come back. Stronger than 404 for SEO removal.</li>
<li><strong>422</strong> — semantic validation (email format, password too short, age out of range)</li>
<li><strong>429</strong> — rate-limited; client must back off</li>
</ul>
<h3>5xx codes blame the server</h3>
<p>"I tried, I failed." 5xx codes ARE typically retryable — with backoff. Most production monitors page on-call when 5xx rate exceeds 0.5%.</p>
<ul>
<li><strong>500</strong> — unhandled exception in your code (log + fix)</li>
<li><strong>502 Bad Gateway</strong> — your nginx couldn't reach your app server (app crashed?)</li>
<li><strong>503 Service Unavailable</strong> — overloaded; database down; deploying. Include <code>Retry-After</code>.</li>
<li><strong>504 Gateway Timeout</strong> — upstream took too long. Increase timeout or speed up upstream.</li>
</ul>
<h3>The hidden case: returning 200 with an error in the body</h3>
<p>Common anti-pattern: <code>200 OK</code> with <code>{ "error": "User not found" }</code>. Why it's bad:</p>
<ul>
<li>Monitoring tools think everything is fine; alerts don't fire</li>
<li>Cloudflare and CDN cache the error response</li>
<li>Retry logic doesn't trigger (clients only retry on 5xx)</li>
<li>Browser DevTools shows green status; users debugging are confused</li>
</ul>
<p><strong>Fix:</strong> use the right status. <code>404</code> for "not found", <code>400</code> for "invalid input", <code>500</code> for "I broke." The response body can <em>also</em> contain detail — but the status comes first.</p>
</section>
<section class="article-section">
<h2>Status codes for SEO — what Google really cares about</h2>
<table class="ref-table">
<thead><tr><th>Code</th><th>Google's interpretation</th><th>Long-term effect</th></tr></thead>
<tbody>
<tr><td><strong>200</strong></td><td>Page exists, may be indexed</td><td>Indexed if content is good</td></tr>
<tr><td><strong>301</strong></td><td>Permanent move; transfer all signals to new URL</td><td>Old URL drops, new URL inherits backlinks & rankings</td></tr>
<tr><td><strong>302/307</strong></td><td>Temporary; keep original in index</td><td>Original URL stays indexed; new URL doesn't accumulate signals</td></tr>
<tr><td><strong>404</strong></td><td>Doesn't exist (yet); will retry crawling</td><td>Eventually drops from index after weeks of consistent 404</td></tr>
<tr><td><strong>410 Gone</strong></td><td>Definitively gone; deindex faster than 404</td><td>Drops from index in days, not weeks</td></tr>
<tr><td><strong>500/503</strong></td><td>Temporary issue; retry later</td><td>Won't deindex unless persistent for weeks</td></tr>
<tr><td><strong>429</strong></td><td>Slow down crawling</td><td>Reduced crawl rate for a few days</td></tr>
</tbody>
</table>
<p><strong>Common SEO mistakes around status codes:</strong></p>
<ul>
<li><strong>"Soft 404"</strong> — returning 200 OK with a "Sorry, not found" page. Google recognizes the pattern as a 404 anyway and penalizes the trick.</li>
<li><strong>302-redirecting permanent moves</strong> — fragments link equity. Use 301.</li>
<li><strong>Returning 503 for too long during deploys</strong> — Google's crawler cuts crawl rate. Aim for sub-minute deploys.</li>
<li><strong>Returning 410 instead of 404 for deleted content</strong> — actually a positive in some cases. Use 410 when you've deliberately removed content forever (deleted blog post, removed product).</li>
</ul>
</section>
<section class="article-section">
<h2>Returning HTTP status codes in 8 frameworks</h2>
<h3>Express (Node.js)</h3>
<div class="lang-block">
<div class="lang-block-header">express</div>
<pre><code>app.get('/users/:id', async (req, res) => {
const user = await db.user.findById(req.params.id);
if (!user) return res.status(404).json({ error: 'User not found' });
res.status(200).json(user);
});
app.post('/users', async (req, res) => {
const u = await db.user.create(req.body);
res.status(201).location(`/users/${u.id}`).json(u);
});
</code></pre>
</div>
<h3>FastAPI (Python)</h3>
<div class="lang-block">
<div class="lang-block-header">fastapi</div>
<pre><code>from fastapi import FastAPI, HTTPException, status
@app.get("/users/{id}", status_code=status.HTTP_200_OK)
def get_user(id: int):
user = db.find_user(id)
if not user:
raise HTTPException(status_code=404, detail="User not found")
return user
@app.post("/users", status_code=status.HTTP_201_CREATED)
def create_user(user: UserIn):
return db.create_user(user)
</code></pre>
</div>
<h3>Spring Boot (Java)</h3>
<div class="lang-block">
<div class="lang-block-header">spring-boot</div>
<pre><code>@GetMapping("/users/{id}")
public ResponseEntity<User> getUser(@PathVariable Long id) {
return userRepo.findById(id)
.map(ResponseEntity::ok)
.orElse(ResponseEntity.notFound().build());
}
@PostMapping("/users")
public ResponseEntity<User> createUser(@RequestBody User u) {
User saved = userRepo.save(u);
return ResponseEntity.created(URI.create("/users/" + saved.getId())).body(saved);
}
</code></pre>
</div>
<h3>Rails (Ruby)</h3>
<div class="lang-block">
<div class="lang-block-header">rails</div>
<pre><code>def show
user = User.find_by(id: params[:id])
return render(json: { error: 'Not found' }, status: :not_found) unless user
render json: user, status: :ok
end
def create
user = User.create!(user_params)
render json: user, status: :created, location: user_url(user)
end
</code></pre>
</div>
<h3>Go (net/http)</h3>
<div class="lang-block">
<div class="lang-block-header">go</div>
<pre><code>func userHandler(w http.ResponseWriter, r *http.Request) {
user, err := db.GetUser(r.URL.Path[7:])
if err != nil {
http.Error(w, "User not found", http.StatusNotFound)
return
}
w.WriteHeader(http.StatusOK)
json.NewEncoder(w).Encode(user)
}
</code></pre>
</div>
<h3>Laravel (PHP)</h3>
<div class="lang-block">
<div class="lang-block-header">laravel</div>
<pre><code>public function show($id) {
$user = User::find($id);
if (!$user) return response()->json(['error' => 'Not found'], 404);
return response()->json($user, 200);
}
public function store(Request $request) {
$user = User::create($request->validated());
return response()->json($user, 201)
->header('Location', "/users/{$user->id}");
}
</code></pre>
</div>
<h3>Cloudflare Workers / Edge runtimes</h3>
<div class="lang-block">
<div class="lang-block-header">workers</div>
<pre><code>export default {
async fetch(req, env) {
const u = await env.DB.get(extractId(req));
if (!u) return new Response('Not found', { status: 404 });
return new Response(JSON.stringify(u), {
status: 200,
headers: { 'content-type': 'application/json' },
});
},
};
</code></pre>
</div>
<h3>Bash / curl (testing)</h3>
<div class="lang-block">
<div class="lang-block-header">bash</div>
<pre><code># Show only the status code (great for monitoring scripts)
curl -s -o /dev/null -w '%{http_code}\n' https://example.com
# Show full headers
curl -I https://example.com
# Follow redirects and report all hops
curl -ILs https://example.com
# Fail bash script if status is not 2xx
curl --fail-with-body https://example.com/api
</code></pre>
</div>
</section>
<section class="article-section">
<h2>Status code best practices</h2>
<ul>
<li><strong>Use the most specific code.</strong> 422 for validation errors beats 400 for everything. 410 for permanently-deleted content beats 404. Specificity helps clients build better error handling.</li>
<li><strong>Never return 200 with an error.</strong> Status codes are how every layer of the stack makes decisions. Lying about success breaks monitoring, retries, caching.</li>
<li><strong>Add <code>Retry-After</code> on 429 and 503.</strong> Tells clients exactly how long to wait. Servers and CDNs (Cloudflare) honor it automatically.</li>
<li><strong>Don't leak stack traces in 500 responses.</strong> Generic "Internal Server Error" + log the real details server-side. Stack traces in production are a security hole.</li>
<li><strong>Use 301 for permanent URL changes; 302 for temporary.</strong> Confusing them fragments SEO equity.</li>
<li><strong>Return a structured error body</strong> with the status code: <code>{ "error": { "code": "USER_NOT_FOUND", "message": "...", "details": {} } }</code>. Lets clients programmatically handle specific errors.</li>
<li><strong>Set proper headers alongside status codes.</strong> <code>Location:</code> on 201/3xx, <code>WWW-Authenticate:</code> on 401, <code>Retry-After:</code> on 429/503, <code>Allow:</code> on 405.</li>
<li><strong>Use 405 Method Not Allowed</strong> for "this endpoint exists, but you can't POST to it." Include <code>Allow: GET, PUT</code> in response.</li>
<li><strong>Distinguish 401 (auth) from 403 (permissions).</strong> Critical for client retry logic — 401 prompts re-login, 403 doesn't.</li>
<li><strong>Don't use 200 for "delete succeeded".</strong> Use 204 No Content. Saves bandwidth, signals intent.</li>
</ul>
</section>
</article>
<section class="faq-section">
<h2>Best HTTP status code reference for 2026 — what to compare</h2>
<p>Search results for "http status codes", "http response codes", "404 meaning" return many references but most are outdated (citing RFC 7231 instead of the current RFC 9110, finalized 2022), missing the newer codes (103 Early Hints widely deployed, 451 Unavailable For Legal Reasons), or don't differentiate the redirect codes 301 vs 302 vs 307 vs 308 — a distinction that breaks POST handlers. Here's how the most-used HTTP status references compare in 2026:</p>
<table class="ref-table">
<thead><tr><th>Reference</th><th>Latest RFC (9110)</th><th>Includes 103 Early Hints</th><th>Searchable</th><th>Cost</th></tr></thead>
<tbody>
<tr><td>FreeDevTool HTTP Status Codes</td><td>Yes</td><td>Yes</td><td>Live filter</td><td>Free</td></tr>
<tr><td>MDN HTTP Status Codes</td><td>Yes</td><td>Yes</td><td>Browse + Ctrl+F</td><td>Free, OSS</td></tr>
<tr><td>httpstatuses.com</td><td>Partial</td><td>Yes</td><td>URL-based</td><td>Free</td></tr>
<tr><td>http.cat / http.dog</td><td>N/A (memes)</td><td>Yes</td><td>No</td><td>Free</td></tr>
<tr><td>RFC 9110 (raw)</td><td>Source of truth</td><td>Yes</td><td>No (PDF)</td><td>Free</td></tr>
</tbody>
</table>
<h3>What's the difference between 301, 302, 307, and 308 redirects?</h3>
<p>Four redirect codes that look similar but behave differently — and getting them wrong breaks POST flows in production:</p>
<table class="ref-table">
<thead><tr><th>Code</th><th>Permanence</th><th>Method preservation</th><th>Use case</th></tr></thead>
<tbody>
<tr><td><strong>301 Moved Permanently</strong></td><td>Permanent</td><td>❌ Browser may switch POST→GET</td><td>Old URL → new canonical URL (SEO transfers link equity)</td></tr>
<tr><td><strong>302 Found</strong></td><td>Temporary</td><td>❌ Browser may switch POST→GET</td><td>Temporary redirect (A/B test, maintenance page)</td></tr>
<tr><td><strong>307 Temporary Redirect</strong></td><td>Temporary</td><td>✅ MUST preserve method + body</td><td>Temporary, when method preservation matters (POST after deploy)</td></tr>
<tr><td><strong>308 Permanent Redirect</strong></td><td>Permanent</td><td>✅ MUST preserve method + body</td><td>Modern equivalent of 301 — preserves POST</td></tr>
</tbody>
</table>
<p>Critical 2026 rule: <strong>use 308 instead of 301</strong> for permanent redirects unless you specifically want browser-quirk behavior (very rare). Cloudflare Pages auto-redirects <code>.html → extensionless</code> with 308 for this reason. The 301/302 method-switching behavior is a 1990s legacy quirk that breaks REST APIs.</p>
<h3>What's the difference between 401 Unauthorized and 403 Forbidden?</h3>
<p>The two codes overlap visually but mean different things. <strong>401 Unauthorized</strong> means "I don't know who you are" — credentials missing, expired, or invalid. The response MUST include a <code>WWW-Authenticate</code> header indicating how to authenticate. Client should retry with credentials. <strong>403 Forbidden</strong> means "I know who you are, but you can't do this" — credentials are valid but the user lacks permission for this resource. Client should NOT retry with the same credentials; they need different credentials or an admin to grant access. Mistake to avoid: returning <strong>404 Not Found</strong> on a forbidden private resource to hide its existence is acceptable for security; returning <strong>401</strong> when you mean <strong>403</strong> sends clients into a credential-refresh loop that won't work.</p>
<h3>HTTP status code reference alternative to httpstatuses.com — 4 reasons developers switched</h3>
<ol>
<li><strong>Live search across all codes.</strong> Type "404", "redirect", or "not found" — results filter instantly. httpstatuses.com requires URL navigation to each code page.</li>
<li><strong>Modern (RFC 9110, 2022) accuracy.</strong> Includes 103 Early Hints (now widely deployed for Largest Contentful Paint optimization), 421 Misdirected Request, 451 Unavailable For Legal Reasons.</li>
<li><strong>Method-preservation table for redirects.</strong> The 301 vs 308 distinction is critical for REST APIs but missing or buried in most references.</li>
<li><strong>Examples in 8 frameworks.</strong> Express, FastAPI, Django, Rails, Spring Boot, Go net/http, ASP.NET Core, Laravel — copy-ready code snippets for returning each code idiomatically.</li>
</ol>
<p>Pair the HTTP status reference with the <a href="/http-request-builder">HTTP Request Builder</a> for testing requests against your API, the <a href="/dns-lookup">DNS Lookup</a> for resolving domains before request, the <a href="/jwt-decoder">JWT Decoder</a> for inspecting auth tokens that produce 401/403, and the <a href="/network-tools">Network & Time Tools hub</a> for the broader networking toolkit.</p>
<h2>Frequently Asked Questions</h2>
<div class="faq-item"><div class="faq-q" onclick="toggleFaq(this)">What are HTTP status codes and why are they important?<svg class="chevron" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><polyline points="6 9 12 15 18 9"/></svg></div><div class="faq-a">HTTP status codes are three-digit numbers returned by a web server in response to a client's request, standardized in RFC 7231 and related RFCs. They are grouped into five categories: 1xx (informational), 2xx (success), 3xx (redirection), 4xx (client error), and 5xx (server error). Understanding these codes is essential for API development, web server configuration, frontend error handling, SEO optimization, and debugging network issues.</div></div>
<div class="faq-item"><div class="faq-q" onclick="toggleFaq(this)">What is the difference between 301 and 302 redirects?<svg class="chevron" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><polyline points="6 9 12 15 18 9"/></svg></div><div class="faq-a">A <strong>301 Moved Permanently</strong> tells browsers and search engines the resource has permanently moved. Search engines transfer link equity (SEO ranking) to the new URL and update their index. A <strong>302 Found</strong> indicates a temporary redirect — the original URL remains in search indexes. Using 301 when you mean 302 (or vice versa) can negatively impact your search rankings and user experience.</div></div>
<div class="faq-item"><div class="faq-q" onclick="toggleFaq(this)">Which HTTP status codes should I use in my REST API?<svg class="chevron" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><polyline points="6 9 12 15 18 9"/></svg></div><div class="faq-a">Common REST API codes: <strong>200</strong> OK (successful GET/PUT), <strong>201</strong> Created (successful POST), <strong>204</strong> No Content (successful DELETE), <strong>400</strong> Bad Request (malformed input), <strong>401</strong> Unauthorized (missing authentication), <strong>403</strong> Forbidden (insufficient permissions), <strong>404</strong> Not Found, <strong>409</strong> Conflict (duplicate resource), <strong>422</strong> Unprocessable Entity (validation failure), and <strong>500</strong> Internal Server Error for unexpected failures.</div></div>
</section>
<section class="related-section">
<h2>Related Tools</h2>
<div class="related-grid">
<a class="related-card" href="json-formatter"><div class="related-icon">{ }</div><div class="related-card-info"><div class="related-card-name">JSON Formatter</div><div class="related-card-desc">Pretty print and validate JSON</div></div></a>
<a class="related-card" href="url-encoder"><div class="related-icon">%</div><div class="related-card-info"><div class="related-card-name">URL Encoder</div><div class="related-card-desc">Encode and decode URLs</div></div></a>
<a class="related-card" href="regex-tester"><div class="related-icon">.*</div><div class="related-card-info"><div class="related-card-name">Regex Tester</div><div class="related-card-desc">Test regular expressions</div></div></a>
</div>
</section>
<section class="all-tools-section" aria-label="Browse all FreeDevTool developer tools">
<h2>Browse all 50 free developer tools</h2>
<p class="atc-sub">All tools run in your browser, no signup required, nothing sent to a server.</p>
<div class="all-tools-grid">
<div class="atc-cat">
<div class="atc-cat-head">
<div class="atc-cat-icon">b64</div>
<div class="atc-cat-title"><h3>Encoding & Conversion</h3><span class="atc-cat-count">11 tools</span></div>
</div>
<ul class="atc-list">
<li><a href="/base64-encoder">Base64 Encoder / Decoder</a></li>
<li><a href="/base64-image">Image to Base64</a></li>
<li><a href="/byte-converter">Byte Converter (KB / MB / GB)</a></li>
<li><a href="/case-converter">Case Converter</a></li>
<li><a href="/hex-to-rgb">Hex to RGB / HSL</a></li>
<li><a href="/html-entity">HTML Entity Encoder</a></li>
<li><a href="/json-to-csv">JSON to CSV Converter</a></li>
<li><a href="/px-to-rem">PX to REM Converter</a></li>
<li><a href="/string-escape">String Escape / Unescape</a></li>
<li><a href="/url-encoder">URL Encoder / Decoder</a></li>
<li><a href="/yaml-to-json">YAML to JSON Converter</a></li>
</ul>
</div>
<div class="atc-cat">
<div class="atc-cat-head">
<div class="atc-cat-icon">{ }</div>
<div class="atc-cat-title"><h3>Formatting & Generators</h3><span class="atc-cat-count">13 tools</span></div>
</div>
<ul class="atc-list">
<li><a href="/color-name">Color Name from Hex</a></li>
<li><a href="/color-picker">Color Palette Picker</a></li>
<li><a href="/css-box-shadow">CSS Box Shadow</a></li>
<li><a href="/css-gradient">CSS Gradient Generator</a></li>
<li><a href="/json-formatter">JSON Formatter / Validator</a></li>
<li><a href="/lorem-ipsum">Lorem Ipsum Generator</a></li>
<li><a href="/markdown-preview">Markdown Preview</a></li>
<li><a href="/password-generator">Password Generator</a></li>
<li><a href="/qr-generator">QR Code Generator</a></li>
<li><a href="/sql-formatter">SQL Formatter</a></li>
<li><a href="/uuid-generator">UUID Generator</a></li>
<li><a href="/word-to-markdown">Word to Markdown</a></li>
<li><a href="/xml-formatter">XML Formatter</a></li>
</ul>
</div>
<div class="atc-cat">
<div class="atc-cat-head">
<div class="atc-cat-icon">JS</div>
<div class="atc-cat-title"><h3>Minifiers & DevOps</h3><span class="atc-cat-count">6 tools</span></div>
</div>
<ul class="atc-list">
<li><a href="/chmod-calculator">chmod Calculator</a></li>
<li><a href="/cron-parser">Cron Expression Parser</a></li>
<li><a href="/css-minifier">CSS Minifier</a></li>
<li><a href="/html-minifier">HTML Minifier</a></li>
<li><a href="/js-minifier">JavaScript Minifier</a></li>
<li><a href="/http-status">HTTP Status Codes</a></li>
</ul>
</div>
<div class="atc-cat">
<div class="atc-cat-head">
<div class="atc-cat-icon">#</div>
<div class="atc-cat-title"><h3>Security & Hashing</h3><span class="atc-cat-count">3 tools</span></div>
</div>
<ul class="atc-list">
<li><a href="/hash-generator">Hash Generator (MD5, SHA)</a></li>
<li><a href="/jwt-decoder">JWT Decoder</a></li>
<li><a href="/jwt-generator">JWT Generator</a></li>
</ul>
</div>
<div class="atc-cat">
<div class="atc-cat-head">
<div class="atc-cat-icon">.*</div>
<div class="atc-cat-title"><h3>Code & Text</h3><span class="atc-cat-count">8 tools</span></div>
</div>
<ul class="atc-list">
<li><a href="/ai-token-counter">AI Token Counter</a></li>
<li><a href="/char-counter">Character & Word Counter</a></li>
<li><a href="/git-cheatsheet">Git Commands Cheatsheet</a></li>
<li><a href="/number-base">Number Base Converter</a></li>
<li><a href="/regex-explainer">Regex Explainer</a></li>
<li><a href="/regex-tester">Regex Tester</a></li>
<li><a href="/text-diff">Text Diff Checker</a></li>
<li><a href="/wcag-contrast">WCAG Contrast Checker</a></li>
</ul>
</div>
<div class="atc-cat">
<div class="atc-cat-head">
<div class="atc-cat-icon">IP</div>
<div class="atc-cat-title"><h3>Network & APIs</h3><span class="atc-cat-count">3 tools</span></div>
</div>
<ul class="atc-list">
<li><a href="/dns-lookup">DNS Lookup</a></li>
<li><a href="/http-request-builder">HTTP Request Builder</a></li>
<li><a href="/ip-lookup">IP Address Lookup</a></li>
</ul>
</div>
<div class="atc-cat">
<div class="atc-cat-head">
<div class="atc-cat-icon">⏱</div>
<div class="atc-cat-title"><h3>Time & Dates</h3><span class="atc-cat-count">3 tools</span></div>
</div>
<ul class="atc-list">
<li><a href="/relative-time">Relative Time Calculator</a></li>
<li><a href="/timestamp-diff">Timestamp Diff</a></li>
<li><a href="/unix-timestamp-converter">Unix Timestamp Converter</a></li>
</ul>
</div>
<div class="atc-cat">
<div class="atc-cat-head">
<div class="atc-cat-icon">SEO</div>
<div class="atc-cat-title"><h3>SEO & Meta</h3><span class="atc-cat-count">3 tools</span></div>
</div>
<ul class="atc-list">
<li><a href="/meta-tag-generator">Meta Tag Generator</a></li>
<li><a href="/og-preview">Open Graph Preview</a></li>
<li><a href="/slug-generator">URL Slug Generator</a></li>
</ul>
</div>
</div>
</section>
</div>
<footer>
<div>© 2026 FreeDevTool — HTTP Status Codes Reference</div>
<div class="footer-links"><a href="/all-tools">All Tools</a><a href="/about">About</a><a href="/privacy">Privacy Policy</a><a href="/terms">Terms of Use</a></div>
</footer>
<script>
const codes=[
{code:100,name:"Continue",desc:"Server received request headers; client should proceed to send the body.",use:"Used in large file uploads with Expect: 100-continue header."},
{code:101,name:"Switching Protocols",desc:"Server is switching to the protocol requested by the client.",use:"Used when upgrading HTTP to WebSocket (Upgrade: websocket header)."},
{code:102,name:"Processing",desc:"Server has received the request and is processing it (WebDAV).",use:"Prevents client timeout for long-running WebDAV operations."},
{code:103,name:"Early Hints",desc:"Server sends preliminary headers before the final response.",use:"Used with Link headers to let browsers preload resources."},
{code:200,name:"OK",desc:"The request succeeded. Response body contains the requested resource.",use:"Standard response for successful GET, POST, PUT, PATCH requests."},
{code:201,name:"Created",desc:"The request succeeded and a new resource was created.",use:"Returned after successful POST that creates a resource. Include Location header."},
{code:202,name:"Accepted",desc:"The request has been accepted for processing but is not yet complete.",use:"Used for async operations like batch jobs, email sending, report generation."},
{code:204,name:"No Content",desc:"The request succeeded but there is no content to send back.",use:"Common response for successful DELETE or PUT that doesn't return a body."},
{code:206,name:"Partial Content",desc:"Server is delivering only part of the resource due to a Range header.",use:"Used for resumable downloads and video streaming (Range requests)."},
{code:207,name:"Multi-Status",desc:"Response contains multiple status codes for multiple sub-requests (WebDAV).",use:"WebDAV batch operations where each sub-request may have a different status."},
{code:301,name:"Moved Permanently",desc:"The resource has been permanently moved to a new URL.",use:"SEO-safe permanent redirects. Search engines transfer ranking to new URL."},
{code:302,name:"Found",desc:"The resource is temporarily located at a different URL.",use:"Temporary redirects (e.g., maintenance). Original URL stays in search index."},
{code:303,name:"See Other",desc:"Response to the request can be found at another URL using GET.",use:"Redirect after POST (Post/Redirect/Get pattern) to prevent form resubmission."},
{code:304,name:"Not Modified",desc:"The resource has not been modified since the last request.",use:"Browser cache validation via If-None-Match (ETag) or If-Modified-Since headers."},
{code:307,name:"Temporary Redirect",desc:"Temporary redirect that preserves the HTTP method.",use:"Like 302 but guarantees the method (POST stays POST). Strict HTTP/1.1."},
{code:308,name:"Permanent Redirect",desc:"Permanent redirect that preserves the HTTP method.",use:"Like 301 but guarantees method preservation. Used for API endpoint moves."},
{code:400,name:"Bad Request",desc:"The server cannot process the request due to malformed syntax.",use:"Invalid JSON body, missing required fields, wrong Content-Type header."},
{code:401,name:"Unauthorized",desc:"Authentication is required and has not been provided or is invalid.",use:"Missing or expired Bearer token, invalid API key, expired session."},
{code:403,name:"Forbidden",desc:"The server understood the request but refuses to authorize it.",use:"Valid auth but insufficient permissions. User cannot access admin endpoints."},
{code:404,name:"Not Found",desc:"The server cannot find the requested resource.",use:"Resource doesn't exist at the URL. Most common error code on the web."},
{code:405,name:"Method Not Allowed",desc:"The HTTP method is not supported for this resource.",use:"Sending POST to a read-only endpoint, DELETE to a non-deletable resource."},
{code:406,name:"Not Acceptable",desc:"The server cannot produce a response matching the Accept headers.",use:"Client requests application/xml but server only supports application/json."},
{code:408,name:"Request Timeout",desc:"The server timed out waiting for the client to send the request.",use:"Client took too long to transmit. Common with slow network connections."},
{code:409,name:"Conflict",desc:"The request conflicts with the current state of the resource.",use:"Duplicate resource creation, version conflict in optimistic locking."},
{code:410,name:"Gone",desc:"The resource is permanently gone and will not be available again.",use:"Stronger than 404. Tells search engines to remove the URL from index."},
{code:411,name:"Length Required",desc:"The server requires a Content-Length header.",use:"Server needs to know request body size before processing."},
{code:413,name:"Payload Too Large",desc:"The request body exceeds the server's size limits.",use:"File upload exceeds max size (e.g., nginx client_max_body_size)."},
{code:414,name:"URI Too Long",desc:"The request URL is longer than the server can handle.",use:"Query string too long. Consider using POST with body instead."},
{code:415,name:"Unsupported Media Type",desc:"The server does not support the request's Content-Type.",use:"Sending text/plain when the endpoint expects application/json."},
{code:418,name:"I'm a Teapot",desc:"The server refuses to brew coffee because it is a teapot (RFC 2324).",use:"April Fools' RFC joke. Some APIs use it as an easter egg response."},
{code:422,name:"Unprocessable Entity",desc:"The request is well-formed but contains semantic errors.",use:"Valid JSON but failed validation (e.g., email format, required fields)."},
{code:429,name:"Too Many Requests",desc:"The client has sent too many requests in a given time period.",use:"Rate limiting. Include Retry-After header with seconds until next allowed request."},
{code:431,name:"Request Header Fields Too Large",desc:"The server refuses the request because headers are too large.",use:"Cookie header too large, or excessive custom headers."},
{code:451,name:"Unavailable For Legal Reasons",desc:"The resource is unavailable due to legal demands (censorship).",use:"GDPR compliance, government censorship, DMCA takedown."},
{code:500,name:"Internal Server Error",desc:"The server encountered an unexpected condition.",use:"Unhandled exception, null pointer, database connection failure."},
{code:501,name:"Not Implemented",desc:"The server does not support the functionality required.",use:"Server doesn't recognize the HTTP method (e.g., PATCH not implemented)."},
{code:502,name:"Bad Gateway",desc:"The server acting as gateway received an invalid response from upstream.",use:"Reverse proxy (nginx) cannot reach the backend application server."},
{code:503,name:"Service Unavailable",desc:"The server is temporarily unable to handle the request.",use:"Server overloaded, under maintenance, or starting up. Use Retry-After header."},
{code:504,name:"Gateway Timeout",desc:"The gateway server did not receive a timely response from upstream.",use:"Backend server too slow. Check database queries, external API calls."},
{code:511,name:"Network Authentication Required",desc:"The client needs to authenticate to gain network access.",use:"Captive portal (hotel/airport WiFi) requiring login before internet access."}
];
let currentFilter='all';
function getCategory(code){return String(code)[0];}
function getCategoryClass(code){return'http-'+getCategory(code)+'xx';}
function renderCodes(filter,search){
const list=document.getElementById('http-list');
let filtered=codes;
if(filter!=='all')filtered=filtered.filter(c=>String(c.code).startsWith(filter));
if(search){const q=search.toLowerCase();filtered=filtered.filter(c=>String(c.code).includes(q)||c.name.toLowerCase().includes(q)||c.desc.toLowerCase().includes(q)||c.use.toLowerCase().includes(q));}
document.getElementById('http-count').textContent='Showing '+filtered.length+' of '+codes.length+' status codes';
list.innerHTML=filtered.map(c=>`<div class="http-item ${getCategoryClass(c.code)}" onclick="this.classList.toggle('open')"><div class="http-code">${c.code}</div><div><div class="http-name">${c.name}</div><div class="http-desc">${c.desc}</div><div class="http-use">Use case: ${c.use}</div></div></div>`).join('');
}
function filterCodes(f,btn){
currentFilter=f;
document.querySelectorAll('.http-filters button').forEach(b=>b.classList.remove('active'));
btn.classList.add('active');
renderCodes(f,document.getElementById('http-search').value);
}
document.getElementById('http-search').addEventListener('input',function(){renderCodes(currentFilter,this.value);});
renderCodes('all','');
function toggleFaq(el){el.parentElement.classList.toggle('open');}
</script>
</body>
</html>