A cookie converter on Android is a browser-based tool that converts manually supplied strict Cookie request-header text into a flat JSON string map and back again.

On an Android device, open the Cookie to JSON Converter in your browser, paste the header value, and review the result before copying it. This is a web workflow rather than a native Android cookie manager: the converter does not read document.cookie, inspect Chrome’s cookie database, modify browser storage, or make an HTTP request.

It is intended for debugging a Cookie request field, moving a reviewed string map into JSON, or producing a request-header value from reviewed JSON strings.

cookie converter on android
Cookie Converter on Android: Strict Header Workflow

Supported conversion directions

The converter offers two related operations. Each direction has its own input requirements, and neither direction accepts arbitrary browser-cookie exports.

Mode Accepted input Result
Cookie to JSON A bare Cookie request value or the same value with an exact Cookie: prefix A flat JSON object containing cookie names and string values
JSON to Cookie Exactly one nonempty JSON object with string values A Cookie request-header value with semicolon-plus-one-space separators

Both operations run entirely in the current browser tab. The result appears as plain text in a read-only area and is never sent to Lizely or another service.

Use this workflow when you have a Cookie request field from a request you control and need to inspect its name-value pairs as JSON.

  1. Open the converter in your Android browser. Use the browser page for the Cookie to JSON Converter; no separate Android application is required.
  2. Select Cookie to JSON mode. Make sure you are converting request-header text rather than a response header or a cookie-store export.
  3. Prepare the request value. It may be a bare value such as SID=abc; lang=en-US, or it may include the exact prefix Cookie:. The field-name capitalization is not significant, but a space before the colon is malformed. Do not paste an entire HTTP request or a Set-Cookie line.
  4. Paste the text. Use your browser’s paste command in the input area. Outer ASCII spaces around the pasted line are ignored, while spacing inside the Cookie field remains subject to the strict format rules.
  5. Run Convert. The converter validates the complete input before publishing a result. It will not salvage selected pairs from a malformed line.
  6. Review every string and the pair count. Check that the names, values, and number of pairs match the original request field. Percent sequences, extra equals signs, and accepted surrounding quotes are preserved literally.
  7. Copy the complete output. Clipboard writing is asynchronous, so wait for the confirmation state. If clipboard permission is denied, the full output remains visible for manual selection.

The converter cannot recover cookies from an Android browser. If Chrome, Firefox, or another application has not given you the request field as text, obtain that field separately from a controlled request capture and paste only the Cookie value here.

The reverse mode is appropriate when a reviewed, flat JSON string map must become a Cookie request-header value.

  1. Switch to JSON to Cookie mode. Changing direction clears any earlier output, error, pair count, and clipboard status.
  2. Prepare one nonempty JSON object. Every property value must be a quoted JSON string. Numbers, booleans, null, arrays, nested objects, comments, trailing commas, and text after the object are rejected.
  3. Check the names and values. JSON escapes are decoded before Cookie validation. A decoded newline, for example, is a control character and fails even if it appeared as an escape in the JSON source.
  4. Run Convert. Accepted pairs are joined with one semicolon followed by one ASCII space. Object member order is retained for output convenience, but Cookie semantics should not depend on that order.
  5. Review and copy. Confirm that the generated value contains only the reviewed pairs. The tool does not sort members, infer paths, generate response attributes, or percent-encode rejected characters.

Accepted JSON strings should already contain the literal cookie data you want. The converter does not decode an application’s session-token format, add or remove quotation marks automatically, or change a value to make it pass validation.

Strict rules that prevent silent changes

The tool uses a strict request serialization profile rather than trying to repair malformed headers. This boundary is consistent with the request Cookie model in RFC 6265 and the ongoing HTTPbis cookie-header specification, while the exact spacing rules define this converter’s acceptance profile.

Area Accepted behavior Rejected or notable behavior
Optional prefix A bare value or an exact Cookie: prefix; the field name is case-insensitive Cookie : is malformed, and an exact Set-Cookie: prefix produces an explicit error
Pair structure Each pair is name=value, and only the first equals sign is structural Spaces around the equals sign, a missing value separator, or a pair without equals fail
Pair separator Multiple pairs use exactly a semicolon followed by one ASCII space A missing separator space, multiple spaces, a trailing semicolon, or an empty pair is rejected
Names RFC token characters; names remain case-sensitive Empty or non-token names fail, and duplicate names are rejected rather than resolved first-wins or last-wins
Values Permitted cookie octets, optionally wrapped in double quotes; an empty value is valid Raw spaces, commas, semicolons, backslashes, controls, and other disallowed octets fail
JSON shape One nonempty flat object with string values Non-string values, nested data, malformed JSON, and duplicate decoded names fail
Safety boundary Ordinary names are converted without changing their case or spelling The names __proto__, prototype, and constructor are blocked in both directions

For one complete example, the Cookie input SID=abc; lang=en-US becomes the JSON object {"SID":"abc","lang":"en-US"} with two pairs. A value such as abc== retains both equals signs because only the first one separates the name from the value. Likewise, %2F stays %2F; percent sequences are not URL-decoded, escaped, normalized, or interpreted.

  • Only the first equals sign in a pair is structural, so extra equals signs remain value data.
  • Accepted surrounding double quotes are part of the serialized Cookie value and remain present in JSON and the reverse conversion.
  • JSON escapes are decoded before validation, which means escaped spellings of the same name can still trigger a duplicate error.
  • The blocked prototype-related names are a defense-in-depth boundary, not a guarantee that arbitrary downstream JSON handling is safe.

A Cookie request field and a Set-Cookie response header carry different information. Confusing the two can lead to a converter error or to false conclusions about a cookie’s security properties.

Property Cookie request header Set-Cookie response header
Direction Sent by the browser with an applicable request Returned by the server to set a cookie
Converter support Accepted as strict request pairs Not parsed; an exact Set-Cookie: prefix causes an error
Response attributes Domain, Path, Expires, Max-Age, Secure, HttpOnly, SameSite, Partitioned, Priority, and extension attributes are not request-cookie pairs May be present in the response, but the converter does not parse or preserve them

A Cookie header cannot reveal a cookie’s expiry, permitted hosts, permitted paths, secure-only state, or HttpOnly state. The converter therefore cannot build a Set-Cookie response, determine whether a session cookie is secure, or infer attributes that were supplied by a server.

Cookie values may also follow application-specific rules that the converter does not understand. It preserves the serialized string rather than decoding a session format or interpreting the meaning of a token.

Privacy, limits, and error handling

The conversion itself runs locally and makes no HTTP request. No cookies are read from document.cookie, no browser cookie store is modified, and the output is not transmitted. Nevertheless, a Cookie header often contains live session secrets. Local processing does not sanitize those secrets for sharing, so keep them private and rotate any credentials that have been exposed.

Input is limited to exactly 100,000 UTF-16 code units, and complete output is limited to 200,000 code units. The exact limits are accepted, while the next code unit is rejected. Conversion never slices, caps, samples, skips, or partially returns the input, and a zero-length output is invalid.

If validation fails, the previous successful result is removed before the error appears. Editing the input or switching direction clears the earlier output, error, pair count, and clipboard status. This prevents an outdated result from being mistaken for the result of the current input.

After conversion, any application that parses or merges the JSON must still handle untrusted data safely. For a general JSON file that is not a Cookie map, JSON Validator provides syntax and structure diagnostics without trying to enforce Cookie-specific name and value rules.

Review before you use the result

  • Confirm that the source contains request Cookie pairs, not Set-Cookie attributes or a browser-storage export.
  • Check every name and value, especially percent sequences, extra equals signs, empty values, and surrounding quotes.
  • Verify the displayed pair count against the source before copying.
  • Keep the converted output out of logs, screenshots, issue reports, and shared chat messages when it contains session credentials.
  • Treat the result as a syntax conversion, not as proof of a cookie’s expiry, path, host scope, Secure state, or HttpOnly state.

This Android workflow is best suited to a strict, manually supplied Cookie request field. It converts representation while preserving accepted strings, but it does not broaden the input format, repair malformed data, access browser cookies, or make unsafe credential handling safe.

For a deeper look, see Box Shadow Generator for Large Text: CSS Workflow.