Rotate Text Left
Shift characters in text to the left by a specified number of positions
Input
Output
Readme
What is text rotation?
Text rotation, also known as circular shift or string rotation, is an operation that moves characters from one end of a string to the other. When rotating left, characters from the beginning of the text are moved to the end, creating a cyclic permutation. This concept is fundamental in computer science, cryptography, and data manipulation algorithms.
Left rotation shifts each character toward the start of the string. The characters that "fall off" the left side wrap around to the right side. For example, rotating "ABCDE" left by 2 positions produces "CDEAB" — the first two characters move to the end.
Tool description
This tool performs left rotation (circular left shift) on text strings. Enter your text and specify how many positions to shift, and the tool instantly shows the rotated result. The rotation is circular, meaning characters shifted off the left end reappear at the right end.
Examples
| Input | Positions | Output |
|---|---|---|
| Hello | 1 | elloH |
| Hello | 2 | lloHe |
| ABCDEF | 3 | DEFABC |
| 12345 | 2 | 34512 |
| rotation | 4 | tionrota |
Features
- Real-time rotation as you type
- Supports any number of positions (automatically wraps for values larger than text length)
- Preserves all characters including spaces and special characters
- Works with Unicode characters and emojis
- Zero dependencies — pure JavaScript implementation
Use cases
- Cryptography learning: Understanding circular shifts used in encryption algorithms like DES and AES
- Programming practice: Testing string manipulation algorithms and understanding array rotation concepts
- Data obfuscation: Simple text transformation for basic encoding purposes
- Puzzle solving: Working with cipher puzzles and word games that involve character shifting