Cookie parser
Parse Cookie and Set-Cookie headers into JSON, with warnings about missing security attributes.
Input
Result
Fill in the input and press Run.
Your input is processed in memory and then discarded. It is not stored or logged. Even so, don't paste live passwords or keys into any online tool.
Use it from code or an agent
curl -s https://setget.net/v1/tools/cookie-parse \
-H 'Content-Type: application/json' \
-d '{"input":{"text":"Set-Cookie: sid=abc123; Path=/; HttpOnly; SameSite=None; Max-Age=3600"}}'
import json, urllib.request
body = {'input': {'text': 'Set-Cookie: sid=abc123; Path=/; HttpOnly; SameSite=None; Max-Age=3600'}}
request = urllib.request.Request("https://setget.net/v1/tools/cookie-parse", json.dumps(body).encode(),
{"Content-Type": "application/json"})
print(json.load(urllib.request.urlopen(request))["result"])
const response = await fetch("https://setget.net/v1/tools/cookie-parse", {
method: "POST",
headers: {"Content-Type": "application/json"},
body: JSON.stringify({"input":{"text":"Set-Cookie: sid=abc123; Path=/; HttpOnly; SameSite=None; Max-Age=3600"}}),
});
console.log((await response.json()).result);
Tool: run_tool
Arguments:
{
"slug": "cookie-parse",
"input": {
"text": "Set-Cookie: sid=abc123; Path=/; HttpOnly; SameSite=None; Max-Age=3600"
}
}
{
"input": {
"text": "Set-Cookie: sid=abc123; Path=/; HttpOnly; SameSite=None; Max-Age=3600"
}
}
Endpoint: POST /v1/tools/cookie-parse. Over MCP: run_tool with slug: "cookie-parse".
Machine-readable: input schema, Markdown. Connect an agent.
Inputs
| Name | Type | Required | What it does |
|---|---|---|---|
text |
string | yes | One or more Cookie or Set-Cookie headers, one per line. |
kind |
string | no | Which header the lines are. "auto" uses the header name, or guesses from the attributes. One of: auto, cookie, set-cookie. Default: "auto". |
Examples
Input
{
"text": "Set-Cookie: sid=abc123; Path=/; HttpOnly; SameSite=None; Max-Age=3600"
}Result
{
"count": 1,
"cookies": [
{
"source": "set-cookie",
"name": "sid",
"value": "abc123",
"domain": null,
"path": "/",
"expires": null,
"max_age": 3600,
"secure": false,
"http_only": true,
"same_site": "None",
"partitioned": false,
"session": false,
"warnings": [
"No Secure attribute: the cookie is also sent over unencrypted HTTP.",
"SameSite=None without Secure: browsers reject this cookie."
]
}
]
}A request header
Input
{
"text": "Cookie: theme=dark; sid=abc123"
}Result
{
"count": 2,
"cookies": [
{
"source": "cookie",
"name": "theme",
"value": "dark"
},
{
"source": "cookie",
"name": "sid",
"value": "abc123"
}
]
}Questions
- What is the difference between Cookie and Set-Cookie?
- Set-Cookie is sent by the server and carries one cookie with its attributes. Cookie is sent by the browser and carries only names and values, several per line.
- Why is a long Max-Age flagged?
- Current browsers shorten any cookie lifetime to about 400 days.
- Is an Expires date checked?
- It is reported as written. Only Max-Age is used for the lifetime warning, because the result must not depend on the current date.
Related tools
- HTTP headers parserTurn a raw block of HTTP headers into JSON, explain the well-known ones and audit security headers.
http-headers-parse - JWT decoderDecode the header and payload of a JSON Web Token and show its times, without verifying it.
jwt-decode - URL parserSplit a URL into scheme, login, host, port, path, query parameters and fragment.
url-parse - .gitignore testerCheck which paths a .gitignore file ignores and which line decided each one, using real Git matching rules.
gitignore-test - Cache-Control explainerExplain a Cache-Control header directive by directive and how browsers and CDNs will treat the response.
cache-control-explain - Card number (Luhn) and IBAN validatorCheck a card number with the Luhn checksum and name its network, or check an IBAN by length and mod-97.
luhn-iban-validate