Rotate text

Rotate text cycles the order of lines, words, or characters by N positions. Forward rotation moves the first N items to the end of the list (everything shifts left); backward rotation does the reverse. Useful for cyclic schedule shifts (rotating who is on call), set rotation puzzles, music-playlist reordering, and quiz answer randomisation. The transformation runs in your browser; nothing uploads.

Input
Line 1:1 LF cloud_done Saved locally
Result Rotate Lines
0 lines 0 chars

Rotation, not shuffling

A rotation is a deterministic cyclic shift: the items keep their relative order, but the starting point changes. Forward by 1 takes the first item and moves it to the end. Backward by 1 takes the last item and moves it to the beginning. Repeat N times to shift by N. This is different from a shuffle (random reorder); use scramble words for that.

Pick the Unit: Lines (split on newlines, the default), Words (split on whitespace), or Characters (every codepoint independently). The Shift number tells the rotation how far to go. Direction picks forward or backward. Negative shift values invert the direction (so -3 forward is the same as 3 backward).

Common applications: rotating a 7-line on-call schedule by one week (shift=1, direction=forward), shifting a Caesar-style cipher at the line level, generating different starting points for a recurring playlist, or producing all rotations of a string for sorting / comparison purposes.

How to use rotate text

  1. 1Paste your list into the input panel, one item per line.
  2. 2Pick the Unit: lines (default), words, or characters.
  3. 3Set the Shift number - how many positions to rotate.
  4. 4Pick a Direction: forward (first to last) or backward (last to first).
  5. 5Click Copy to copy the rotated list.

Keyboard shortcuts

Drive TextResult without touching the mouse.

Shortcut Action
Ctrl FOpen the find & replace panel inside the input Plus
Ctrl ZUndo the last input change
Ctrl Shift ZRedo
Ctrl Shift EnterToggle fullscreen focus on the editor Plus
EscClose find & replace, or exit fullscreen
Ctrl KOpen the command palette to jump to any tool Plus
Ctrl SSave current workflow draft Plus
Ctrl PRun a saved workflow Plus

What this tool actually does

Three units of rotation

Lines splits on \n and rotates the array of lines. Words splits on whitespace runs (preserves the inter-word spacing intact when rejoining). Characters rotates each codepoint independently, so emoji and accented letters survive.

Forward / backward direction

Forward shifts the front of the list to the back: [A, B, C, D] shifted forward by 1 becomes [B, C, D, A]. Backward does the opposite: [D, A, B, C]. Negative shifts invert the direction.

Shift wraps modulo length

A shift larger than the list length wraps. Shifting a 7-item list by 10 is the same as shifting by 3. Shifting by 0 (or by exactly the list length) is a no-op. This makes it safe to use the tool with arbitrary shift values without worrying about overflow.

Worked example

Unit = lines, Shift = 1, Direction = backward. The last item (Friday) moves to the top; everything else shifts down one.

Input
Monday
Tuesday
Wednesday
Thursday
Friday
Output
Friday
Monday
Tuesday
Wednesday
Thursday

FAQ

How is this different from shuffling?
Rotation is deterministic - every item keeps its relative position, just the starting point changes. Scramble words randomly reorders. Use rotation for schedule shifts, cyclic puzzles, and Caesar-style transformations; use scramble for randomisation.
What does negative shift do?
A negative shift inverts the direction. shift = -3, direction = forward is identical to shift = 3, direction = backward. The combination is useful when scripting against the tool with a single signed number.
Why does word mode preserve odd whitespace?
Splitting on whitespace runs and rejoining loses the original gap widths. The tool splits on whitespace AS items, so the gaps come along for the ride and get reordered with their adjacent words. The result preserves the visual spacing pattern (mostly).
Is this related to ROT13?
No. ROT13 rotates the alphabet within each character (A becomes N, B becomes O, etc) - that is a substitution cipher. This tool rotates the order of WHOLE items (lines, words, characters) without changing them. For ROT13, use ROT13 cipher.