Skip to content

API

Cookie Parser & Builder

Parse, edit and rebuild Cookie and Set-Cookie HTTP headers.

Loading tool…

Find this tool in

Helpful references

About this tool

What is Cookie Parser & Builder?

Read request cookie pairs or prepare a response cookie with explicit attributes. Request Cookie and response Set-Cookie have different structures, so choose the appropriate mode before pasting a value. Generated settings need to match the real deployment's HTTPS, domain and cross-site behavior.

A worked example

Read two request cookies without a header prefix

Example input

theme=dark; locale=es

Expected result

theme → dark
locale → es

Choose the request-cookie parser and paste only the header value. The semicolon separates two name-value pairs. Attributes such as HttpOnly and SameSite belong to response Set-Cookie settings and are not recovered from this request value. This example contains preferences rather than reusable session credentials.

Common mistakes and limits

  • HttpOnly restricts script access to a cookie; it does not prevent the browser from sending that cookie with eligible HTTP requests.
  • A syntactically generated cookie can still be rejected by a browser because of origin, Secure, SameSite or domain rules.

Features

What you can do

  • Parse request Cookie headers containing multiple values.
  • Inspect Set-Cookie attributes such as Secure, HttpOnly and SameSite.
  • Edit cookie names, values and attributes.
  • Add, duplicate and remove request cookies.
  • Rebuild valid Cookie and Set-Cookie header values.
  • Process all cookie data locally in your browser.

Frequently asked questions

Questions about Cookie Parser & Builder

What is the difference between Cookie and Set-Cookie?

A server sends Set-Cookie in a response to create or update a cookie. A browser later sends stored cookies back to the server using the Cookie request header.

What does HttpOnly do?

HttpOnly prevents client-side JavaScript from accessing the cookie through document.cookie, reducing exposure to some cross-site scripting attacks.

What does the Secure attribute do?

Secure instructs browsers to send the cookie only over secure HTTPS connections, except for limited localhost behavior implemented by some browsers.

What does SameSite control?

SameSite controls when cookies are included in cross-site requests. Common values are Strict, Lax and None.

Are cookie values uploaded?

No. Parsing and rebuilding happen entirely inside your browser.

Related tools