Insert text between characters
Insert a chosen string between characters every N characters: configurable interval (1–200), skip the first N characters, per-line counting, and \t \n \\ escapes in the inserted text. Counting is by code point, so an emoji counts as one character. Runs entirely offline.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
Result
Insertions only happen between characters, never after the last one in a line.
Paste some text to see the result and the insertion count
What this tool does
- Break a long phone number or card number into groups of four so it can be checked digit by digit.
- Add separators to a long cipher string before sending it, so the recipient cannot paste it back with the split in the wrong place.
- Build fill-in-the-blank drills by inserting spaces or underscores between letters; switch off per-line counting to let line breaks take part in the sequence.
Example
Input
12345678901
Output
1234 5678 901
Produced with interval 4, a single space as the inserted text and every other option left at its default: the 11 digits give 2 insertions, and the trailing 3 digits get nothing.
Frequently asked questions
Will it add an extra separator at the end of a line?
No. An insertion happens only when the number of emitted characters is an exact multiple of the interval and more characters follow. So 11 characters at interval 4 give exactly 2 insertions (after the 4th and the 8th character).
How are multiple lines counted?
Per-line counting is the default: every line restarts at its first character, line breaks are not counted and never receive an insertion, so line ends stay clean. Switch it off to count the whole text as one sequence, where the line break itself counts as one character.
What is "skip the first N characters" for?
It lets you process only the tail of the text: with 4, nothing is inserted after the first four characters and insertions start from the fifth character on. It counts characters, not insertions.
Can the inserted text contain a tab or a line break?
Yes. With "unescape backslashes" on (the default) \t becomes a tab, \n a line break and \\ a single backslash; with it off the backslashes are inserted literally. The inserted text is limited to 20 characters.
How does counting treat emoji?
Counting is by code point, so one emoji (a surrogate pair whose JavaScript length is 2) counts as a single character: with interval 1 and "-" as the inserted text, "😀好" becomes "😀-好", because the emoji is not treated as two characters. The input limit is 200000 characters.
Keywords:insert textadd separatorpad between characters