🔄 Text Rotate

Rotate text characters by N positions cyclically. "abcde" rotated by 2 becomes "cdeab" — instant, in-browser, no upload.

About the Text Rotate Tool

The text rotator performs a cyclic shift of characters in your input. With a positive shift to the left, characters at the start move to the end — so abcde rotated left by 2 becomes cdeab. Choose right rotation to shift characters from the end to the start. The rotation wraps around, so any integer (even larger than the text length) works correctly.

By default the whole input (including newlines) is rotated as one string. Toggle Per-line to rotate each line independently while preserving line breaks — useful for aligning tabular data or shifting lines of fixed-width text.

How it works

  • The input is split into an array of Unicode code points via Array.from, so emoji and astral characters rotate as whole units.
  • The effective shift is positions mod length, with sign flipped for right rotation, then the array is sliced and rejoined.
  • In per-line mode, the same logic runs on each line independently and lines are rejoined with \n.

How to use the rotator

  1. Paste or type your text in the input box.
  2. Enter the number of Positions to shift and pick a Direction.
  3. Optionally toggle Per-line to rotate each line independently.
  4. Click Rotate, then Copy the result or Clear to start over.

Frequently asked questions

What happens if positions is larger than the text length? The shift wraps cyclically, so rotating a 5-character string by 7 is equivalent to rotating by 2.

Can I use negative positions? Yes. Negative values flip the direction — rotating left by -2 is the same as rotating right by 2.

Does it upload my text? No. All rotation happens locally in your browser. Your text never leaves your device.

Are emoji handled correctly? Yes. The tool uses Unicode-aware splitting, so surrogate pairs and astral characters rotate as single units.