Skip to content

JSON cookie formats

There is no single JSON cookie format. Four shapes are in common use, and they store different amounts of information. This is what each one looks like and what it can hold.

What each format can store

FormatDomainExpiryFlags
Cookie-Editor and EditThisCookieYesYesYes
Puppeteer and PlaywrightYesYesYes
Key-value mapNoNoNo
Cookie header stringNoNoNo

The four shapes

Converting between them loses information

Going from a complete format to key-value or a header is one-way: the domain, path, expiry and flags have nowhere to be stored. Converting back gives you session cookies with whatever domain you supply. The converter warns you when a conversion would drop data.

Try it in the converter

Converter

Need the same conversion from a script? Netscape, Cookie-Editor, Puppeteer, key-value and Cookie headers are on the public JSON API. API documentation