Skip to content

Main content

RFC 2047 Encoded Word Header Fields Tool

Compute rfc 2047 encoded word header fields from explicit bounded inputs.

Loading tool…

Description

Split a restricted MIME encoded-word into header fields.

Escaping and token decoding depend on the surrounding format. Form-data plus signs, MIME Q underscores, quoted-printable octets and quoted CSV fragments have different meanings even when their text looks similar.

Split a restricted MIME encoded-word into header fields.

When to use this tool

Use RFC 2047 Encoded Word Header Fields when decoding one explicitly supported format fragment.

How to use the tool and how it works

  1. Enter word. 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 charset, encoding, payload. Use the output convention below.

Split a restricted MIME encoded-word into header fields. Require charset without whitespace/question mark, B/Q case-insensitively, similarly bounded payload and total length <= 75; uppercase encoding and preserve payload.1

Q-encoded header words give underscore a space meaning; encoded-word syntax alone does not perform charset conversion or complete header parsing.2

Input fieldMeaning and unitsAccepted input
wordWordRequired. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
charsetCharsetRequired. Text; maximum UTF-16 length 8192.
encodingEncodingRequired. Text; maximum UTF-16 length 8192.
payloadPayloadRequired. Text; maximum UTF-16 length 8192.
json
{
  "input": {
    "word": "=?UTF-8?B?YWJj?="
  },
  "output": {
    "charset": "UTF-8",
    "encoding": "B",
    "payload": "YWJj"
  }
}

Limitations and assumptions

  • Payload encoding and charset registration are not verified; adjacent encoded-words and header context are not parsed.
  • 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 the full format-specific parser for framing, context, charset conversion and complete data validation.

References

  1. Calculation and input contract: decode/rfc2047-encoded-word-header-fields — tool.io

  2. RFC 2047: encoded mail header words — RFC Editor

Similar or alternative tools