Overview
Httpbin is an open-source HTTP request and response service that provides a range of endpoints for testing and debugging. Launched in 2011, it functions as a sandbox for developers to interact with HTTP requests and inspect the resulting responses. The service is primarily used by developers building HTTP clients, working with webhooks, or configuring network proxies, offering a controlled environment to observe how different HTTP features behave.
For example, an endpoint like /get returns all incoming GET request data, including headers, query parameters, and the client's IP address. Other endpoints allow for testing specific HTTP methods (POST, PUT, DELETE, PATCH), managing cookies, simulating various HTTP status codes (e.g., /status/404 or /status/200), and exploring authentication mechanisms. This functionality reduces the need for developers to deploy their own test servers, streamlining the development and debugging workflow.
Httpbin is particularly beneficial for scenarios where exact control over HTTP response behavior is required. When developing a client that needs to handle redirects, a developer can use Httpbin's /redirect/:n endpoint to simulate a chain of redirects. Similarly, to test how a client processes specific HTTP headers, the /headers endpoint reflects all received headers. Its utility extends to validating webhook implementations, where a service needs to send data to a specific URL and receive a predictable response, or to configuring network proxies and inspecting how they modify HTTP traffic.
The project is entirely free and open-source, allowing users to either utilize the public instance at httpbin.org or deploy their own instance for private use. This flexibility makes it a versatile tool for both individual developers and larger teams seeking a reliable and transparent HTTP testing utility. The source code is available, offering transparency into its operations and enabling community contributions for new features or bug fixes. This open approach aligns with common development practices for robust web services, as described by organizations like the Internet Engineering Task Force (IETF) in their standards for HTTP protocol behavior.
Key features
- Request inspection endpoints: Provides endpoints (e.g.,
/get,/post,/headers) that reflect incoming request data, including method, headers, query parameters, form data, and JSON payloads. - Response control endpoints: Allows users to specify HTTP status codes (e.g.,
/status/:code), control response headers, and delay responses (e.g.,/delay/:n) to simulate network latency. - Authentication testing: Offers endpoints for Basic Auth (
/basic-auth/:user/:passwd) and Digest Auth (/digest-auth/:qop/:user/:passwd) to test client-side authentication implementations. - Cookie management: Endpoints like
/cookies/set?name=valueand/cookiesenable setting and inspecting cookies received by the server. - Redirection testing: Supports various redirection scenarios, including 302/303 redirects (
/redirect/:n) and relative redirects (/relative-redirect/:n), useful for testing client-side redirect handling. - File upload/download: Provides endpoints for testing file uploads (
/postwith multipart/form-data) and serving arbitrary files (/bytes/:n,/stream-bytes/:n). - JSONP support: Includes an endpoint (
/jsonp) for testing JSON with Padding (JSONP) callbacks. - Open-source and self-hostable: The service is fully open-source, enabling users to inspect its code, contribute, or host their own private instances for specific testing needs.
Pricing
As of May 2026, Httpbin is a free and open-source service. There are no direct costs associated with using the public instance at httpbin.org, nor are there licensing fees for self-hosting the application.
| Service Tier | Description | Features | Cost (as of May 2026) |
|---|---|---|---|
| Public Instance | Hosted service at httpbin.org | All Httpbin endpoints, no rate limits (subject to fair use) | Free |
| Self-Hosted | Deploy your own instance | All Httpbin endpoints, full control over environment, no external dependencies | Free (excluding infrastructure costs) |
Users who opt to self-host Httpbin will incur costs related to their chosen infrastructure (e.g., cloud hosting, virtual private servers) but not for the Httpbin software itself. Further details on the project and its usage can be found on the Httpbin homepage.
Common integrations
Httpbin is a testing utility rather than a service designed for direct integration into production systems. Its primary integration points are through development tools and environments that send HTTP requests. Common usage scenarios include:
- cURL and command-line tools: Developers frequently use
curlor similar command-line utilities to send requests to Httpbin endpoints for quick tests and debugging. - Programming language HTTP clients: Integration involves using native HTTP client libraries (e.g., Python's
requests, Node.js'saxios, Java'sHttpClient) to make requests to Httpbin within application code during development and testing. - Automated testing frameworks: Httpbin is often incorporated into unit or integration tests written with frameworks like Jest, Pytest, or JUnit to simulate server responses without mocking.
- API testing tools: Tools like Postman, Insomnia, or Paw can be used to construct and send complex HTTP requests to Httpbin endpoints, aiding in API client development.
- Webhook debugging: Services that send webhooks can be configured to point to Httpbin endpoints (e.g.,
/post) to inspect the exact payload and headers received. - Proxy configuration testing: Developers configure proxies to route traffic through Httpbin to verify proxy behavior, header modification, and request routing.
Alternatives
- mockbin.org: A similar service from Kong that allows for creating custom HTTP endpoints to inspect requests and define responses.
- RequestBin (requestbin.com): A service focused on inspecting incoming HTTP requests, particularly useful for debugging webhooks and callbacks.
- Postman Echo (postman-echo.com): A service provided by Postman that reflects requests, supports authentication, and allows for response manipulation.
- Beeceptor (beeceptor.com): An HTTP proxy and mocking tool that allows for inspecting, modifying, and mocking HTTP requests and responses.
- Webhook.site: Provides a unique URL to capture and inspect all incoming HTTP requests and emails, with options to create custom responses.
Getting started
To get started with Httpbin, you can use a simple HTTP client like curl to send a request to one of its endpoints. This example demonstrates how to make a GET request and inspect the response, which includes request headers, origin IP, and URL.
curl -X GET "https://httpbin.org/get?param1=value1¶m2=value2" \
-H "Accept: application/json" \
-H "User-Agent: MyTestClient/1.0"
This command sends a GET request to the /get endpoint with two query parameters and custom headers. The response from Httpbin will be a JSON object reflecting these details:
{
"args": {
"param1": "value1",
"param2": "value2"
},
"headers": {
"Accept": "application/json",
"Host": "httpbin.org",
"User-Agent": "MyTestClient/1.0",
"X-Amzn-Trace-Id": "Root=1-6655c6e8-2b8f8a1a3e3b7b2c1d1e0f0g"
},
"origin": "YOUR_IP_ADDRESS",
"url": "https://httpbin.org/get?param1=value1¶m2=value2"
}
You can also test other HTTP methods, such as POST, with data:
curl -X POST "https://httpbin.org/post" \
-H "Content-Type: application/json" \
-d '{"key": "value", "number": 123}'
The response for a POST request will include the submitted JSON data in the json field:
{
"args": {},
"data": "{\"key\": \"value\", \"number\": 123}",
"files": {},
"form": {},
"headers": {
"Content-Length": "30",
"Content-Type": "application/json",
"Host": "httpbin.org",
"User-Agent": "curl/7.81.0",
"X-Amzn-Trace-Id": "Root=1-6655c7b0-1a2b3c4d5e6f7g8h9i0j1k2l"
},
"json": {
"key": "value",
"number": 123
},
"origin": "YOUR_IP_ADDRESS",
"url": "https://httpbin.org/post"
}
These examples illustrate the basic interaction with Httpbin, demonstrating its utility for quickly verifying HTTP client behavior and inspecting request details. For a full list of available endpoints and their functionalities, consult the Httpbin API reference.