Interleave two lists into one
Merge two texts is useful when you have two parallel lists (questions and answers, English and translation, A column and B column) that need to be zipped together. The split between texts is a line containing exactly ---. The tool walks both halves in parallel; for each index it emits A's line first, then B's line.
When the two halves are unequal in length, the longer side is still emitted in full. If A has 5 lines and B has 3, output is A1, B1, A2, B2, A3, B3, A4, A5. Empty trailing lines on the shorter side do not produce extra blank rows; missing entries are simply skipped.
The output preserves every byte of each line, including leading and trailing spaces. Need a different combination strategy? See find common lines for set intersection or diff for change tracking.
How to use merge two texts line by line
- 1Paste text A into the input panel, then a line with
---, then paste text B. - 2The interleaved output appears in the output panel, alternating A and B line by line.
- 3Click Copy in the output header to copy the merged text.
- 4Click Download to save the result as a plain-text file.
- 5For a Q&A or label/value pairing, put the labels in A and the values in B.
Keyboard shortcuts
Drive TextResult without touching the mouse.
| Shortcut | Action |
|---|---|
| Ctrl F | Open the find & replace panel inside the input Plus |
| Ctrl Z | Undo the last input change |
| Ctrl Shift Z | Redo |
| Ctrl Shift Enter | Toggle fullscreen focus on the editor Plus |
| Esc | Close find & replace, or exit fullscreen |
| Ctrl K | Open the command palette to jump to any tool Plus |
| Ctrl S | Save current workflow draft Plus |
| Ctrl P | Run a saved workflow Plus |
How the merge works
Strict interleave order
For every index i the tool emits A[i] then B[i]. The pattern is A, B, A, B, A, B regardless of content.
Unequal lengths handled gracefully
If A is longer than B, the trailing A lines are emitted on their own. If B is longer, the trailing B lines come last. No padding lines are inserted.
Lines emitted verbatim
Each line is passed through unchanged, including leading and trailing whitespace. Tabs, mixed scripts, and emoji come through intact.
Three-hyphen separator
Both halves go in the same input pane, separated by a line containing exactly ---. Without it the tool returns a prompt asking for two halves.
Plain-text output
Output is plain text with one entry per line, ready to paste into a spreadsheet, a study deck, or another tool.
Worked example
Lines alternate A then B at each index. To combine into shared lines instead of an alternating pattern, see find common lines.
red green blue --- one two three
red one green two blue three
Settings reference
| Behaviour | Effect on output |
|---|---|
| Separator | A line containing exactly --- splits text A from text B. |
| Order | A[i] then B[i] at each index. |
| Unequal lengths | Longer side's extra lines emitted at the end without padding. |
| Whitespace | Each line passes through unchanged. |
| Empty lines | Treated as a line and emitted in turn. |
| Line endings | CRLF and LF accepted; output uses LF. |
| Missing separator | Output prompts for two halves split by ---. |