Guides

Understand lexical rather than numeric line sorting

Follow these steps using a local file and keep the original.

Understand lexical rather than numeric line sorting
Actual local tool workspace with a synthetic sample.

Prepare the example

Create disposable test input with the exact content below (UTF-8 text unless marked hex). For duplicate filenames, save the two files in separate folders.

labels.txt
2
10
1

Create a text file with the lines 2, 10 and 1.

Run the workflow

  1. Open the related tool below and load the prepared file(s).
  2. Sort lines and inspect the order 1, 10, 2.

Verified example result

This example was reproduced in Chrome on 2026-12-04 using FileTypeKit 0.9.0 and synthetic data. The expected result or expected refusal was checked; this does not establish support for every real file.

The downloaded output was checked against the expected properties below.

Example output
labels.txt
Observed size
6 bytes
SHA-256
32d5c2d95a5bef8b0f13c335628b73422fa80b6eba491f32520f57a395c464bb

This digest describes the tested output; other encoders or versions may produce different bytes. Verify the expected properties, not only the digest.

Limitations and what to verify

If numeric order matters, parse numbers in a suitable data tool first.

Open related tool