TL;DR
HTTPBin is a free HTTP request and response debugging service. Send any kind of HTTP request and get back exactly what was sent — headers, query parameters, form data, JSON body, cookies, origin IP, and more. Supports all HTTP methods (GET, POST, PUT, PATCH, DELETE) and features like auth testing, response delay simulation, status code generation, and redirect chains. Essential tool for API development and testing.
Quick start: https://httpbin.org/get
No API key needed — free HTTP debugging!
How to Use This API
1. Inspect a GET Request
See what headers, arguments, and origin IP your client sends:
https://httpbin.org/get?foo=bar&baz=qux
2. Test a POST with JSON
https://httpbin.org/post
3. Simulate a Delayed Response
https://httpbin.org/delay/5
4. JavaScript — POST JSON and Inspect Response
fetch('https://httpbin.org/post', {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Alice', role: 'developer'})
})
.then(r => r.json())
.then(data => {
console.log('Headers sent:', data.headers);
console.log('JSON sent:', data.json);
console.log('Origin IP:', data.origin);
});
5. Python — Test All Methods
import requests
methods = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE']
for method in methods:
resp = requests.request(method, f'https://httpbin.org/{method.lower()}')
data = resp.json()
print(f"{method}: {data['url']}")
print(f" Origin: {data['origin']}")
print(f" User-Agent: {data['headers']['User-Agent'][:40]}...")
6. Generate Specific HTTP Status Codes
# Test your error handling
https://httpbin.org/status/404
https://httpbin.org/status/500
https://httpbin.org/status/301
https://httpbin.org/get
Frequently Asked Questions
- What endpoints does HTTPBin offer?
- Key endpoints:
/get,/post,/put,/patch,/delete,/ip,/headers,/status/{code},/delay/{n},/redirect/{n},/basic-auth/{user}/{pass},/image,/xml,/json, and many more. - Can I test authentication schemes?
- Yes — HTTPBin supports Basic Auth (
/basic-auth/{user}/{pass}), Digest Auth (/digest-auth/{qop}/{user}/{pass}), Bearer token (/bearer), and Cookie-based auth testing. - How do I test file uploads?
- POST to
/postwith multipart/form-data containing a file. The response will echo the file metadata and contents back to you. - Can I simulate response delays?
- Yes —
/delay/{n}waits n seconds before responding./dripstreams data over time. Useful for testing timeout handling and async behavior. - Does it support HTTPS?
- Yes — use
https://httpbin.orgfor all endpoints. HTTP also works but redirects to HTTPS. - Are there any rate limits?
- HTTPBin is a free community service. It's fine for testing and debugging but not designed for production traffic. You can self-host it via the open-source GitHub repo.
API Details
- API URL
https://httpbin.org/- Documentation
- httpbin.org
- Category
- Developer Tools
- Authentication
- Not Required (built-in auth testing endpoints available)
- Source
- github.com/postmanlabs/httpbin
What You Can Build
- API client debugger during development and troubleshooting
- Webhook testing tool verifying what data your service sends
- HTTP client test suite for CI/CD pipeline integration
- Request inspector for reverse-engineering API calls
- Network troubleshooting assistant checking proxy/VPN behavior