Skip to content

Tool 04 / Format lines

A prefix and suffix for every line.

Turn a plain list into quoted CSV values, SQL strings, planned file names, or numbered items — without editing each line by hand.

  • Free to use
  • Line numbers
  • Runs locally
Live workbench3 lines changed
Line options

Prefix and suffix are inserted literally — spaces are preserved. Use the escape option to add a tab or a line break.

Result
3 lines in3 changed0 skipped74 chars outNever uploaded

What it does

This tool wraps every line in the text you provide. A prefix is inserted at the start of a line, a suffix at the end, and the original line stays in between. It is the kind of tiny operation that is tedious by hand and trivial by script — except you do not always have a script open.

The common cases are quoting values for SQL, wrapping CSV cells in quotes, adding bullets or labels to a Markdown list, and planning a batch of file names before a rename. An optional numbering mode adds a running number in one of five styles, with a configurable start value.

Prefixes and suffixes are inserted literally. Spaces are preserved exactly, so a prefix of four spaces indents the block and a prefix of - creates a bullet. The preview updates as you type, and the skipped-line count tells you how many blanks or header rows were passed through.

How to use it

  1. Paste one item per line into Your lines.
  2. Enter the text to add before the line and the text to add after it.
  3. Leave Skip blank lines on unless empty lines need the same decoration.
  4. If the first line is a header, turn on Skip first line so it is not quoted or numbered.
  5. Check the preview, then copy or download the result.

Options explained

Prefix
Inserted before each processed line. Spaces count. A quote, a dash, an indentation, or a language keyword are all valid.
Suffix
Inserted after each processed line, before the line break. A quote, a comma, a semicolon, or a file extension are the usual choices.
Skip blank lines
Passes empty and whitespace-only lines through unchanged. With this off, a blank line becomes just the prefix and suffix, which can be useful for placeholders but is usually noise.
Skip first line
Leaves the first line untouched. Designed for CSV headers and table headings. A skipped header is not numbered, so the first data row starts at the configured start value.
Interpret \n and \t
Converts the two-character sequences \n and \t into a real line break or tab inside the prefix, suffix, or number separator. Any other backslash sequence is left alone.
Numbering
Adds a running decimal number before the prefix. Choose a start value and one of five styles: 1., 1), (1), [1], or 01.. Skipped lines do not consume a number.

Examples

Quote every value for SQL
Prefix ' · suffix ',

This is the shape of an IN (...) list, with one caveat: the last line also gets a comma, which SQL will reject. Delete the final comma before running the query, or build the list with a trailing empty line and remove it there. The tool does not try to guess which line is last.

Bullets for a Markdown list
Prefix - · blanks skipped

Before

First point
Second point

Third point

After

- First point
- Second point

- Third point

The blank line is preserved, so the list keeps its paragraph break. If you want a tight list, remove the blank lines first or turn on “Remove blank lines” in Clean Text.

Number a checklist
Numbering 1) · start 1

Before

Wash the parts
Rinse the parts
Dry the parts

After

1) Wash the parts
2) Rinse the parts
3) Dry the parts

The number sits before the prefix. With an empty prefix, the result is a clean numbered list. The numbers are plain decimal text, not an ordered-list feature, so they survive a copy into any plain-text field.

Plan a batch of file names
Prefix 2026-10- · suffix .jpg

Before

harbour
lighthouse
dunes

After

2026-10-harbour.jpg
2026-10-lighthouse.jpg
2026-10-dunes.jpg

The output is a list, not an actual rename. Paste it into your file manager or rename utility after checking that the order matches the files. A numbering option is useful when several files share a name.

When it earns its keep

  • SQL and API payloads. Quote a column of IDs or email addresses, then paste the list into an IN clause or a JSON array.
  • CSV preparation. Wrap values in quotes, add a trailing delimiter, and handle the last row deliberately.
  • Batch file renaming. Add a date prefix, a project code, or an extension to every planned name before touching the filesystem.
  • Markdown and documentation. Turn a plain list into bullets, checkboxes, or labeled entries.
  • Mail merge and template prep. Add a label, a bracket, or a placeholder around each line.
  • Log and config editing. Prefix each line with a comment marker or a namespace, then paste it back into the file.

Limits worth knowing

  • It only adds. There is no remove mode and no conditional logic. Removing a common prefix is a job for Find & Replace with a multiline regex.
  • No escaping. If a value already contains the quote you are wrapping it in, the result may be invalid CSV or SQL. Escape those values first.
  • Numbering is decimal only. No Roman numerals, letters, or custom zero-padding beyond the 01. style.
  • Output uses LF line breaks. Windows CRLF input is Normalized. If the target system requires CRLF, convert it after pasting.
  • Whitespace-only lines count as blank. A line with a single space is skipped when “Skip blank lines” is on, even though the space is technically content.
  • Nothing is saved. Copy the output before closing or refreshing the tab.

Page updated

Questions, answered

Does it add the prefix to blank lines?

Only if you turn “Skip blank lines” off. With the default setting, empty and whitespace-only lines are passed through untouched, which is usually what you want when a list has deliberate gaps.

Can I add a tab or a line break instead of visible text?

Yes. Put \t or \n in the prefix or suffix field and enable “Interpret \n and \t”. The sequence becomes a real tab or line break. Only those two escapes are interpreted; other backslash sequences stay literal.

Where does the number go when numbering is on?

The number is placed before your prefix. With the prefix “- ” and the 1) style, a line becomes “1) - item”. Skipped lines — blanks and an optional header — are not numbered, so the sequence stays continuous.

How do I make a quoted SQL or CSV list?

Use a single quote or double quote as the prefix and the matching quote plus a comma as the suffix. The final line will also get a comma, which is invalid in an IN (...) list and often unwanted in CSV. Remove the last comma by hand or with Find & Replace before running the query.

Can it remove a prefix instead of adding one?

Not on this page. To remove a common prefix, use Find & Replace with Regular expression and Multiline anchors enabled: search for ^your-prefix and replace with nothing. That anchors the match at the start of every line.

Does the tool escape quotes inside my values?

No. It only adds the prefix and suffix you type. If a value already contains the quote character you are wrapping it in, the resulting CSV or SQL may be invalid. Escape or replace those values first.

All tools →