Free Echo API — Mock REST API for Testing & Development
The Echo API acts as an instant mirror for HTTP requests. It accepts GET, POST, and PUT calls and returns everything received: incoming query parameters, parsed JSON request bodies, raw text, and HTTP request headers. It is an indispensable debugging utility when inspecting webhook payloads, CORS issues, or custom client headers.
Interactive Live API Explorer
/api/echo?text=Hello%20World&count=5&active=true
Echoes the query parameters provided in the request URL.
You can add or change query parameters in the path above (e.g., ?name=User).
/api/echo
Echoes the JSON or Text body sent in the request. Try sending non-JSON text too!
Code Integration Examples
// Free Echo API - JavaScript Fetch Example
async function fetchEchoAPI() {
try {
const response = await fetch('https://gen-endpoint.com/api/echo?text=Hello%20World&count=5&active=true', {
method: 'GET',
headers: {
'Content-Type': 'application/json',
},
});
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
const data = await response.json();
console.log('Success:', data);
return data;
} catch (error) {
console.error('Fetch error:', error);
}
}
fetchEchoAPI();Sample JSON Response
{
"type": "GET",
"queryParams": {
"text": "Hello World",
"count": "5",
"active": "true"
},
"message": "Query parameters echoed successfully.",
"headers": { "example-header": "example-value" },
"timestamp": "2024-08-15T12:00:00.000Z"
}Common Developer Use Cases
Inspecting HTTP request headers and authorization token formats.
Testing webhook dispatchers and verifying JSON serialization formats.
Debugging proxy servers, API gateways, and custom fetch wrappers.
Teaching HTTP request/response lifecycles in computer science classrooms.
Related Free REST APIs
Greeting API
A versatile API for generating greeting messages. Supports simple GET requests and POST requests with data.
Webhook Management API
Register, manage, test webhook endpoints, and track delivery attempts with retry logic.
File Upload & Management API
Handle file uploads, downloads, metadata, and bulk operations with validation.
Rate Limiting API
Demonstrate rate limiting patterns, quota management, and different tier restrictions.
Frequently Asked Questions
Can I send non-JSON text bodies?
Yes, the Echo API gracefully handles plain text, JSON, and encoded strings.
Does it echo custom request headers?
Yes, custom headers (such as X-Custom-Header or Authorization) are returned in the response object under "headers".
Can I test query parameter arrays and special characters?
Yes, all query parameters including arrays and encoded values are parsed and echoed cleanly.