418 I'm a teapot
An April Fools' joke from the 1998 Hyper Text Coffee Pot Control Protocol (RFC 2324), now reserved as unused in the official registry.
The server refuses to brew coffee because it is, permanently, a teapot.
418 is not an official HTTP status. It comes from RFC 2324 (an April Fools' joke) and RFC 9110 Section 15.5.19 reserves the number as "(Unused)" because it is widely implemented as an Easter egg.
What HTTP 418 I'm a teapot Means
The server refuses to brew coffee because it is, permanently, a teapot.
An April Fools' joke from the 1998 Hyper Text Coffee Pot Control Protocol (RFC 2324), now reserved as unused in the official registry.
Common Causes
- HTCPCP protocol implementation
- Easter egg
- Joke response
What Visitors Should Do
- This is a joke status code
Notes for Developers
- Do not use 418 for real errors in production APIs
- Pick a standard code instead (e.g. 400, 403, 429)
- If you keep it as an Easter egg, document it
History of 418
RFC 2324, published on 1 April 1998, defined the Hyper Text Coffee Pot Control Protocol (HTCPCP) as a parody of how HTTP was being extended. It says a teapot asked to brew coffee should answer 418 I'm a teapot. RFC 7168 (2014) later extended the joke to tea.
The code spread into frameworks and websites as an Easter egg. When RFC 9110 consolidated HTTP in 2022, it marked 418 as reserved so that the number is not reassigned while that usage is widespread.
Returning a 418 I'm a teapot (Code Examples)
If you build APIs or web apps, here is how to send an HTTP 418 response and how to test for it:
Node.js (Express)
app.get('/resource', (req, res) => {
res.status(418).json({ error: 'I'm a teapot' });
});
Python (Flask)
@app.route('/resource')
def resource():
return jsonify(error='I'm a teapot'), 418
PHP
<?php
http_response_code(418);
header('Content-Type: application/json');
echo json_encode(['error' => 'I'm a teapot']);
Check the status with curl
curl -I https://example.com/resource
# Look for: HTTP/1.1 418 I'm a teapot
Frequently Asked Questions
What does HTTP 418 I'm a teapot mean?
An April Fools' joke from the 1998 Hyper Text Coffee Pot Control Protocol (RFC 2324), now reserved as unused in the official registry. In short: The server refuses to brew coffee because it is, permanently, a teapot.
How should I handle an HTTP 418 I'm a teapot response?
Do not use 418 for real errors in production APIs. Pick a standard code instead (e.g. 400, 403, 429). If you keep it as an Easter egg, document it.
Is 418 I'm a teapot a real status code?
Not officially. The IANA registry lists 418 as "(Unused)" and reserves it; it only exists because of the RFC 2324 April Fools' joke. Use a real 4xx code in production APIs.
Official Specification
The 418 I'm a teapot status code is reserved in RFC 9110 Section 15.5.19 (originally RFC 2324).