Prepare a JSON API
Create Accept and Content-Type headers for a REST API.
Prepare a set of HTTP headers, define their values, and retrieve the result in a syntax ready for network requests.
One header per line: Name: value
Prepare consistent HTTP headers and them as raw HTTP, JSON, or Fetch syntax.
Enter one header per line as Name: value. The first colon separates the name from the content; later colons remain in the value, as in a URL. Blank lines are ignored. The engine trims surrounding whitespace, checks header-name characters and rejects prohibited control characters in values. A line without a name before the separator is rejected.
Header names are case-insensitive. When several lines name the same field, the last replaces earlier values and retains its final spelling. The counter counts normalized fields. This suits simple configuration but does not preserve every line of an HTTP response: distinct Set-Cookie fields cannot be faithfully represented in this object. Use the analyzer to inspect an existing block rather than applying this configuration merge.
HTTP output is a list of lines, JSON output an object and Fetch output a headers: {...} fragment for request options. No status, method or body is generated. JSON, cache and CORS presets are starting points to adapt. Access-Control-Allow-* fields belong in server responses; adding them to a request does not grant CORS permission. Some headers remain browser-controlled and can be refused when a real request is made.
Start from a preset or your own lines. Distinguish request headers such as Accept from fields the server must send in its response.
Add a field per line and check duplicate names. The last value wins; the tool does not validate the semantics of every directive.
Generate and copy or download HTTP lines, a JSON object or the Fetch fragment. Applying them in a client or server remains a separate action.
Create Accept and Content-Type headers for a REST API.
Assemble Cache-Control directives for a selected environment.
Produce a consistent group of CORS response headers.
Accept describes the desired response and Content-Type the sent body. The two fields remain distinct and are not interchangeable.
Input
Accept: application/json
Content-Type: application/jsonResult
Accept: application/json
Content-Type: application/jsonBoth lines refer to the same name despite their case. JSON retains only the final value and spelling.
Input
Accept: text/plain
accept: application/jsonResult
{
"accept": "application/json"
}No. It is a headers options fragment. Add a suitable URL, method and body yourself, or use the API request builder.
The generator normalizes configuration to one value per name. It does not reproduce each HTTP field’s individual repetition semantics.
No. The server must send suitable response headers. Its policy must match origins, methods and any authentication requirements.
No. Validation checks the general form and prohibited characters. Check values, request-versus-response use and the receiving client’s restrictions separately.
Related tools
Tools similar or complementary to this one.
Build a complete HTTP API request with method, URL, parameters, headers, and body.
Analyze HTTP headers to review security, caching, CORS, and cookie behavior.
Find a MIME type from an extension or the other way around.
Understand HSTS, CSP, X-Content-Type-Options, Referrer-Policy and Permissions-Policy and how to verify the headers actually returned.
Understand ISO 8601 week numbers, Unix timestamps in seconds or milliseconds, and the difference between human-readable dates and technical time values.