Prefix every line, paragraph, or the whole block
Prefix is the string to attach. Scope picks where it goes. Per Line (the default) inserts it at the start of every line, including blank ones unless Skip Empty is on. Per Paragraph inserts it once at the start of each paragraph (a paragraph is a run of lines separated by two or more line breaks). Whole Text inserts it once at the very start of the input.
Skip Empty looks at line.trim() === '' for the per-line scope, so a line with only spaces or tabs counts as empty and is left alone. For the paragraph scope the same check applies to whole paragraph chunks. Whole-text scope ignores the toggle because there is only one insertion point.
Common uses: turning a list into a Markdown bullet list (- per line), commenting out a code block (// or # per line), or adding a header tag (INTRO: whole text). To wrap each line on both sides at once use wrap each line.
How to use add a prefix to every line
- 1Paste your text into the input panel on the left.
- 2Type the string you want to prepend into the Prefix field.
- 3Pick a Scope:
Per Line,Per Paragraph, orWhole Text. - 4Toggle Skip Empty on if you want blank lines or blank paragraphs left untouched.
- 5Click Copy or Download in the output header to take the result.
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 |
What this tool actually does
Three scope modes, line is the default
The Scope select picks the unit. Per Line splits on \r?\n and prepends to each piece. Per Paragraph splits on two-or-more line breaks (the separator chunks pass through unchanged). Whole Text just prepends once to the entire string.
Skip Empty is whitespace-aware
A line counts as empty if trim() returns an empty string, so spaces and tabs do not block the skip. With the toggle on, those lines pass through unchanged and unprefixed.
Paragraph mode preserves separators
When Scope is Per Paragraph the blank-line separators between paragraphs are kept exactly as they were in the input, including the number of consecutive newlines.
Empty prefix is a no-op
If you leave Prefix empty the tool returns the input unchanged. Nothing is prepended, including in Whole Text mode.
Line endings are normalised on output
The split uses \r?\n, the join uses \n, so CRLF input becomes LF output in per-line mode. Whole-text mode preserves the input verbatim apart from the prepended string.
Worked example
Prefix - , scope Per Line, Skip Empty off. Turn the toggle on and the blank line between bravo and charlie stays bare.
alpha bravo charlie
- alpha - bravo - - charlie
Settings reference
| Behaviour | Effect on output |
|---|---|
| Prefix empty | Input passes through unchanged. |
Scope = Per Line |
Prefix is inserted at the start of every line. Default mode. |
Scope = Per Paragraph |
Prefix is inserted once at the start of each paragraph (paragraphs split on two or more line breaks). |
Scope = Whole Text |
Prefix is inserted once at the very start of the input. |
| Skip Empty off | Every line or paragraph gets the prefix, including blank ones. |
| Skip Empty on | Lines or paragraphs whose trim() is empty pass through unchanged. |
| Line endings | Per-line and per-paragraph modes normalise CRLF to LF on output. Whole-text mode preserves input verbatim. |
FAQ
How is a paragraph defined?
Can I use a multi-character prefix?
- for bullets, // or # for comments, or > for Markdown blockquotes.Does Skip Empty ignore lines with only spaces?
line.trim() === '', so spaces and tabs count as blank.