Skip to content

Main content

Encoding: Percent Encode Octet Tool

Format exactly one unsigned byte as an uppercase percent triplet without treating byte values as Unicode text.

Loading tool…

Description

Return triplet as a percent sign followed by the byte's two hexadecimal digits.

URL-related escapes are octet representations whose interpretation depends on the component and media type. A percent triplet and form-data plus sign do not have interchangeable space rules in every URL context.

Return triplet as a percent sign followed by the byte's two hexadecimal digits.

When to use this tool

Use Encoding: Percent Encode Octet when checking one octet escape or form-data space/plus convention.

How to use the tool and how it works

  1. Enter octet. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read result. Expand result to inspect the returned fields.

Require whole octet in [0,255]. Return triplet as a percent sign followed by the byte's two hexadecimal digits.1

Input fieldMeaning and unitsAccepted input
octetOctetRequired. Safe integer.
Output fieldInterpretationReturned shape
resultObject containing the named calculated members below.Required. Object.
result.tripletTripletCalculated result member: string.
json
{
  "input": {
    "octet": 255
  },
  "output": {
    "result": {
      "triplet": "%FF"
    }
  }
}

Limitations and assumptions

  • One octet is encoded regardless of whether a URL component would allow it literally. This does not convert Unicode text to bytes or select component-specific escaping rules.
  • 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.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Use a full component-appropriate URL or form encoder for Unicode text and complete request data.

References

  1. Calculation and input contract: encode/percent-encode-octet — tool.io

Similar or alternative tools