Burrows-Wheeler Transform

Enter Your Input

Enter an original string with $ marker (e.g., banana$) for forward transform, or a BWT result with $ (e.g., annb$aa) for reverse transform.

Forward Transform

Step 1: Create Rotation Matrix

Generate all rotations of the input string and sort them lexicographically.

BWT Result:

Inverse Transform

Step 2: Reconstruct Original

Use the BWT string to reconstruct the original by building the sorted matrix and following arrows.

Original String: