Burrows-Wheeler Transform
The Burrows-Wheeler Transform (BWT) rearranges a string so that similar characters cluster together — the reversible heart of bzip2 compression. It lists all cyclic rotations of the input, sorts them, and takes the last column as the output (plus an index that lets you invert it). This tool transforms and inverts, and shows the rotation table. Everything runs locally in your browser.
Result
Rotation table (forward, small inputs)
Forward: build all n cyclic rotations of the input, sort them lexicographically, and output the last column L together with the row index idx where the original string landed. Inverse: from L and idx, the LF-mapping reconstructs the original exactly — the last character of the original is L[idx], and a rank/count table walks backward to recover every preceding character. No sentinel character is needed, so the transform works on arbitrary text (including the output of itself). The transform alone doesn't shrink data; it clusters repeated characters so a follow-up Move-to-Front + Run-Length Encoding pass compresses well — which is why it pairs with the Run-Length Encoding tool. Input is capped at 4096 characters. Everything runs locally — nothing leaves your browser.