User Rating 0.0 β˜…β˜…β˜…β˜…β˜…
Total Usage 0 times
Paste or type any Unicode text.
Positive = forward, negative = backward.
Characters outside this range pass through unchanged.
Is this tool helpful?

Your feedback helps us improve.

β˜… β˜… β˜… β˜… β˜…

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.

unicode cipher caesar shift text encoder codepoint character shift unicode rotation text transformation

Formulas

The core transformation for each character with codepoint c within a range [R0, R1] and shift offset k:

cβ€² = R0 + ((c βˆ’ R0 + k) mod N + N) mod N

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 NameStartEndSize (N)CoversUse Case
Printable ASCIIU+0020U+007E95Space, digits, letters, punctuationClassic Caesar / ROT13 on English text
ASCII FullU+0000U+007F128Control chars + printable ASCIIBinary-safe byte rotation
Latin ExtendedU+0000U+024F592Basic Latin, Latin-1 Supplement, Extended-A/BEuropean languages with diacritics
Basic Multilingual PlaneU+0000U+FFFF65,536Almost all modern scripts, CJK, symbolsMultilingual text obfuscation
Full UnicodeU+0000U+10FFFF1,114,112All planes including emoji, historic scriptsEmoji & supplementary plane shifting
Digits OnlyU+0030U+0039100-9Numeric rotation / digit scramble
Uppercase LatinU+0041U+005A26A - ZTraditional ROT-N on uppercase only
Lowercase LatinU+0061U+007A26a - zTraditional ROT-N on lowercase only
CyrillicU+0400U+04FF256Russian, Ukrainian, Serbian, etc.Cyrillic-only cyclic cipher
ArabicU+0600U+06FF256Arabic script charactersArabic text rotation
Greek & CopticU+0370U+03FF144Ξ± - Ο‰, Ξ‘ - Ξ©, CopticGreek alphabet shifting
CJK Unified IdeographsU+4E00U+9FFF20,992Chinese, Japanese Kanji, Korean HanjaCJK obfuscation
Hangul SyllablesU+AC00U+D7AF11,184Pre-composed Korean syllablesKorean text scramble
Emoji (Misc Symbols)U+1F600U+1F64F80Emoticons blockEmoji rotation for fun encoding
DevanagariU+0900U+097F128Hindi, Sanskrit, MarathiDevanagari script shifting
KatakanaU+30A0U+30FF96Japanese KatakanaKatakana rotation
HiraganaU+3040U+309F96Japanese HiraganaHiragana rotation
Mathematical AlphanumericU+1D400U+1D7FF1,024Bold, italic, script math lettersMathematical notation styling

Frequently Asked Questions

Characters whose codepoints are not within [Rβ‚€, R₁] pass through the shifter unchanged. This means if you select "Printable ASCII" (U+0020 - U+007E) and your input contains emoji or CJK characters, those non-ASCII characters appear verbatim in the output. Only characters inside the active range are rotated.
The tool uses String.prototype.codePointAt() and String.fromCodePoint() which correctly handle characters above U+FFFF (supplementary planes). JavaScript's for...of iteration yields full codepoints, not individual UTF-16 surrogates, so emoji like U+1F600 are treated as single units. The "Full Unicode" range mode (U+0000 - U+10FFFF) wraps across all 1,114,112 valid codepoints.
No. A cyclic shift is a substitution cipher equivalent to Caesar's cipher generalized to Unicode. It is trivially breakable by frequency analysis or brute-force (at most N attempts where N is the range size, often 95 or 26). Use this for obfuscation, encoding puzzles, ROT13-style transforms, or educational purposes. For actual encryption, use the Web Crypto API with AES-GCM.
Because the operation is modular: (c βˆ’ Rβ‚€ + N) mod N ≑ (c βˆ’ Rβ‚€) mod N. Shifting by N (or any multiple of N) is an identity transform. For printable ASCII with N = 95, a shift of 95 produces the original string. ROT13 exploits this property with N = 26: applying ROT13 twice yields the identity since 13 + 13 = 26.
Yes. Select "Uppercase Latin" (U+0041 - U+005A) or "Lowercase Latin" (U+0061 - U+007A) as your range. Only characters within that exact span are shifted; digits, spaces, punctuation, and all other characters pass through unmodified. To shift both cases simultaneously, use the "Preserve case" option which applies separate modular wraps to uppercase and lowercase ranges independently.
The shift value can be any integer. Internally it is reduced modulo N before application, so a shift of 1,000,000 on a 95-character range is equivalent to 1,000,000 mod 95 = 45. Negative values shift in the opposite direction. The input field accepts values from βˆ’1,114,111 to 1,114,111 (the maximum Unicode codepoint).
The "Preserve case" toggle is designed for Latin-alphabet ranges. When enabled on "Printable ASCII", uppercase letters (A - Z) cycle within U+0041 - U+005A and lowercase (a - z) cycle within U+0061 - U+007A independently. All other characters in the range cycle normally. For non-Latin scripts (Cyrillic, Greek), the tool applies the standard full-range shift since case-aware sub-ranging for every script is not implemented. The reference table lists which ranges are case-split.