Skip to content

Main content

Headline Character Budget Tool

Check a headline against a Unicode code-point budget; grapheme clusters and display width are not counted.

Loading tool…

Description

Count headline by Unicode code points.

Text layout distinguishes Unicode characters, encoded bytes, and visual columns. These counts need not agree: a tab depends on its column position, while a newline is a sequence of characters with a particular spelling.

Count headline by Unicode code points.

When to use this tool

Use Headline Character Budget when you need one deterministic text-layout or encoding component under the stated counting convention.

How to use the tool and how it works

  1. Enter headline, maximumCodePoints. 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 usedCodePoints, remainingCodePoints, withinBudget. Inspect withinBudget before interpreting the associated values.

Count headline by Unicode code points. Subtract usedCodePoints from nonnegative maximumCodePoints and compare inclusively for withinBudget.1

Input fieldMeaning and unitsAccepted input
headlineHeadlineRequired. Text; maximum UTF-16 length 8192.
maximumCodePointsMaximum Code PointsRequired. Safe integer; minimum 0.
Output fieldInterpretationReturned shape
usedCodePointsUsed Code PointsRequired. Safe integer.
remainingCodePointsRemaining Code PointsRequired. Safe integer.
withinBudgetWithin BudgetRequired. Boolean.
json
{
  "input": {
    "headline": "News today",
    "maximumCodePoints": 20
  },
  "output": {
    "usedCodePoints": 10,
    "remainingCodePoints": 10,
    "withinBudget": true
  }
}

Limitations and assumptions

  • Negative remaining budgets are retained; code points differ from graphemes, UTF-16 units, byte length, and visual headline width.
  • 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

Inspect the final text in the target encoding and renderer when display width or line wrapping matters.

References

  1. Calculation and input contract: media-studies/headline-character-budget — tool.io

Similar or alternative tools

  • UTF-8 Codepoint Byte Budget

    Validate codePoint as a Unicode scalar and return one, two, three, or four UTF-8 bytes at the 0x7F, 0x7FF, and 0xFFFF boundaries.

  • Caption Character Rate Cue

    Require nonnegative integer characterCount and positive durationSeconds and divide for charactersPerSecond.