Cyclic Unicode Shifter
Shift Unicode characters cyclically by any offset within configurable ranges. Encode, decode, and explore Caesar-cipher-style transformations on full Unicode text.
| Char | Original CP | Shifted CP | Shifted Char | Hex |
|---|
About
A cyclic character shift applies modular arithmetic to every codepoint in a string: cβ² = R0 + ((c β R0 + k) mod N), where R0 is the range start, N is the range size, and k is the shift offset. Choosing the wrong range collapses surrogate pairs or maps printable text into control characters, producing output that breaks parsers, corrupts clipboard contents, or silently fails in downstream systems. This tool enforces range-safe wrapping across four tiers - printable ASCII, Extended Latin, the full Basic Multilingual Plane, and all 1,114,112 Unicode codepoints - so every shifted character lands in a valid, displayable slot. It is the only step between a toy ROT13 and a proper Unicode-aware cyclic encoder.
Formulas
The core transformation for each character with codepoint c within a range [R0, R1] and shift offset k:
where N = R1 β R0 + 1 is the range size. The double-modulo pattern ((x mod N + N) mod N) ensures correct wrapping for negative shifts where a single modulo in JavaScript would yield a negative remainder.
To decode, apply the inverse shift kβ² = βk. Since (k + (βk)) mod N β‘ 0, the original codepoint is perfectly restored. Characters outside the selected range pass through unmodified.
Where c = original codepoint, cβ² = shifted codepoint, R0 = range start (inclusive), R1 = range end (inclusive), k = shift offset (any integer), N = total characters in range.
Reference Data
| Range Name | Start | End | Size (N) | Covers | Use Case |
|---|---|---|---|---|---|
| Printable ASCII | U+0020 | U+007E | 95 | Space, digits, letters, punctuation | Classic Caesar / ROT13 on English text |
| ASCII Full | U+0000 | U+007F | 128 | Control chars + printable ASCII | Binary-safe byte rotation |
| Latin Extended | U+0000 | U+024F | 592 | Basic Latin, Latin-1 Supplement, Extended-A/B | European languages with diacritics |
| Basic Multilingual Plane | U+0000 | U+FFFF | 65,536 | Almost all modern scripts, CJK, symbols | Multilingual text obfuscation |
| Full Unicode | U+0000 | U+10FFFF | 1,114,112 | All planes including emoji, historic scripts | Emoji & supplementary plane shifting |
| Digits Only | U+0030 | U+0039 | 10 | 0-9 | Numeric rotation / digit scramble |
| Uppercase Latin | U+0041 | U+005A | 26 | A - Z | Traditional ROT-N on uppercase only |
| Lowercase Latin | U+0061 | U+007A | 26 | a - z | Traditional ROT-N on lowercase only |
| Cyrillic | U+0400 | U+04FF | 256 | Russian, Ukrainian, Serbian, etc. | Cyrillic-only cyclic cipher |
| Arabic | U+0600 | U+06FF | 256 | Arabic script characters | Arabic text rotation |
| Greek & Coptic | U+0370 | U+03FF | 144 | Ξ± - Ο, Ξ - Ξ©, Coptic | Greek alphabet shifting |
| CJK Unified Ideographs | U+4E00 | U+9FFF | 20,992 | Chinese, Japanese Kanji, Korean Hanja | CJK obfuscation |
| Hangul Syllables | U+AC00 | U+D7AF | 11,184 | Pre-composed Korean syllables | Korean text scramble |
| Emoji (Misc Symbols) | U+1F600 | U+1F64F | 80 | Emoticons block | Emoji rotation for fun encoding |
| Devanagari | U+0900 | U+097F | 128 | Hindi, Sanskrit, Marathi | Devanagari script shifting |
| Katakana | U+30A0 | U+30FF | 96 | Japanese Katakana | Katakana rotation |
| Hiragana | U+3040 | U+309F | 96 | Japanese Hiragana | Hiragana rotation |
| Mathematical Alphanumeric | U+1D400 | U+1D7FF | 1,024 | Bold, italic, script math letters | Mathematical notation styling |