Description
Parse one strict RFC9110 qvalue, allowing at most three fractional digits and only zero fractions after one; no whole-header parsing.
HTTP fields use specific token, quoted-string, range, quality-weight, and entity-tag grammars. Quoted text is not automatically safe as a filename or equivalent to an escaped string in another language. Parsing one parameter or marker is separate from interpreting a full request or response.
Parse one strict RFC9110 qvalue, allowing at most three fractional digits and only zero fractions after one; no whole-header parsing.
When to use this tool
Use Parsing: HTTP Qvalue Single Token when you need to parse this one supported HTTP field component or parameter token.
How to use the tool and how it works
- Enter token. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read result. Expand result to inspect the returned fields.
Accept 0 or 1 with an optional decimal point and up to three fractional digits, requiring only zeros after one. Return the numeric quality inside result.1
HTTP quality weights range from zero to one, with at most three fractional digits in the qvalue syntax. Zero denotes an unacceptable preference in negotiation, though this tool only parses the numeric token.2
| Input field | Meaning and units | Accepted input |
|---|---|---|
| token | Complete literal token in the grammar stated above. | Required. Text. Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| result | Object containing the calculated result members described below. | Required. Object. |
| result.quality | Numeric qvalue between zero and one. | Calculated result member: number. |
{
"input": {
"token": "0.750"
},
"output": {
"result": {
"quality": 0.75
}
}
} Limitations and assumptions
- The grammar allows 0. and 1. but rejects .5, excess precision, whitespace, and a q= prefix. It parses one qvalue without content negotiation or preference sorting.
- Outputs are nested inside result. Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
Alternative or Complementary methods
Use a full header parser and the relevant HTTP semantics when request behavior depends on the result. Check extended parameters, field context, and downstream use of returned text separately.
References
-
Calculation and input contract: parse/http-qvalue-single-token — tool.io
-
RFC 9110: Quality Values — IETF / RFC Editor
Similar or alternative tools
- HTTP Contentdisposition Filename Parameter
Unescape backslash pairs in quoted values and return filename and quoted.
- HTTP Etag Weak Prefix Token
Return weak and the literal opaque value.