Header Dedupe Suffix Counter
Make exact duplicate headers unique with _2, _3, and later suffixes, reserving all original names so generated names never steal a later header.
Description
Duplicate header names can make column lookup ambiguous.
Duplicate header names can make column lookup ambiguous. Adding suffixes resolves exact duplicates, but generated names also need to avoid colliding with original names that appear later in the header row.1
Make exact duplicate headers unique with _2, _3, and later suffixes, reserving all original names so generated names never steal a later header.
When to use Header Dedupe Suffix Counter
Use this tool to make exact duplicate headers unique with _2, _3, and later suffixes, reserving all original names so generated names never steal a later header.
Choose the original CSV text, decoded cell strings, byte values or counts requested by this tool. Use the stated delimiter, encoding, indexing and number/date convention.
How to use Header Dedupe Suffix Counter and understand its results
- Choose the original CSV text, decoded cell strings, byte values or counts requested by this tool. Use the stated delimiter, encoding, indexing and number/date convention.
- Enter headers using the field table and calculation rules, then run the tool.
- Read headers. The explanation below defines the units, signs, ordering and any flags or placeholder values.
- If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
| Input field | Meaning | Value type; see rules below | Requirement |
|---|---|---|---|
| headers | Headers | list of string; maximum length: 10000; minimum entries: 0; maximum entries: 10000 | Required |
Provide headers in their original order. The tool reserves every original spelling, keeps each first occurrence unchanged and renames later occurrences with an increasing underscore-number suffix starting at 2. A candidate is skipped if it is already used or is any original header. For example, a, a, a_2 becomes a, a_3, a_2. Comparisons are case-sensitive; empty strings are allowed and the output order is preserved.
duplicate name → name_2, name_3, …, skipping reserved or used names Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.
| Output field | Meaning | Value type |
|---|---|---|
| headers | Headers | list of string |
{
"input": {
"headers": [
"name",
"name",
"name_2"
]
},
"output": {
"headers": [
"name",
"name_3",
"name_2"
]
}
} Limitations and assumptions
It does not trim, fold case, infer equivalent names or enforce a consumer's identifier rules. Only exact duplicate spellings are resolved, and existing suffixes are not interpreted as a numbering scheme.
Numeric inputs must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Cell-string lists also have a combined text budget of 100,000 UTF-16 units per list. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors.
Alternative or Complementary methods
Use Duplicate Header Detector: Find exact case-sensitive duplicate header names with all zero-based positions, without trimming or changing header text. For a complementary task, use Mixed Header Case Conflict Check: Find header groups that collide after locale-independent lowercase conversion; preserve original spelling and report zero-based indices.
References
-
Header Dedupe Suffix Counter — tool.io
Similar or alternative tools
- Duplicate Header Detector
Find exact case-sensitive duplicate header names with all zero-based positions, without trimming or changing header text.
- Mixed Header Case Conflict Check
Find header groups that collide after locale-independent lowercase conversion; preserve original spelling and report zero-based indices.