---
title: "Line Prefix & Suffix"
description: "Add a prefix, a suffix, or line numbers to every line of a text. Start at any number, step by any amount, pad with zeros, and skip blank lines. Runs in your browser, no signup."
url: https://findutils.com/text/line-prefix-suffix/
category: text
---

# Line Prefix & Suffix

Add a prefix, a suffix, or line numbers to every line of a text. Start at any number, step by any amount, pad with zeros, and skip blank lines. Runs in your browser, no signup.

**Use this tool:** [Line Prefix & Suffix](https://findutils.com/text/line-prefix-suffix/)

## Programmatic access

- REST id `line-prefix-suffix`: POST https://api.findutils.com/api/tools/line-prefix-suffix/execute (reference: https://findutils.com/api/line-prefix-suffix/)
- MCP tool `line_prefix_suffix` on https://mcp.findutils.com (reference: https://findutils.com/mcp/line-prefix-suffix/)

## Why use a line prefix and suffix tool?

A list often needs the same small change on every line: a dash in front to make Markdown bullets, a comma at the end to build a SQL IN list, quotes around each value for a JSON array, or a running number for a numbered list, a script, or a transcript. Doing that by hand on a hundred lines is slow and error-prone, and a spreadsheet formula is more work than the job deserves. This tool applies one prefix, one suffix, and an optional line number to every line in one pass and shows how many lines changed.

## Frequently Asked Questions

### What order do the number, prefix, and suffix take?

The line number comes first, then the prefix, then the original line, then the suffix. With a prefix of "- " and numbering on, a line reads "1. - item". Turn numbering off when you want only the bullet.

### How do I change the number style?

Edit the Number format field. The placeholder {n} is replaced by the number, and the rest is kept as typed. "{n}. " gives "1. ", "{n}) " gives "1) ", "[{n}] " gives "[1] ", and "{n}\t" puts a tab after the number.

### Can I start at zero or at a large number?

Yes. Start at accepts any whole number, including zero and negative values. Step sets the increment, so a start of 10 and a step of 10 gives 10, 20, 30.

### What does Pad with zeros do?

It pads every number to the width of the last number. A list of 120 lines gets 001 to 120, so the numbers line up in a monospace editor and sort correctly as text.

### How are blank lines handled?

With Skip blank lines on, a line that holds only whitespace is left as it is and does not consume a number. With it off, the blank line gets the prefix, suffix, and number like any other line.

### Does the Line Prefix & Suffix tool require a signup?

No. It is available with no signup and no usage limits. The processing runs in your browser, so the text you paste is not uploaded to a server.

### Can I run the same operation from a script or an AI client?

Yes. The same function powers the REST tool line-prefix-suffix at api.findutils.com and the MCP tool line_prefix_suffix at mcp.findutils.com. The arguments are text, prefix, suffix, number_lines, start_at, step, number_format, pad_numbers, and skip_blank.

### How do I wrap each line in quotes?

Set the prefix to a quote mark and the suffix to a quote mark followed by a comma. Each line becomes "value", ready to paste into a JSON array or a SQL IN list. Remove the last comma by hand.

### Does it change the text inside the lines?

No. The tool adds text at the start and the end of each line and never edits the middle. Use Find & Replace to change text inside a line.

### Is there a size limit?

The page has no fixed limit; your browser's memory is the ceiling. The REST and MCP surfaces cap one request at 1 MB.

## Related Tools

- [Text Line Sorter](https://findutils.com/text/text-line-sorter/)
- [Duplicate Line Remover](https://findutils.com/text/duplicate-line-remover/)
- [Text Find & Replace](https://findutils.com/text/text-find-replace/)
- [Whitespace Cleaner](https://findutils.com/text/whitespace-cleaner/)
- [Case Converter](https://findutils.com/text/case-converter/)
- [Markdown Table Generator](https://findutils.com/text/markdown-table-generator/)
- [JSON Formatter](https://findutils.com/developers/json-formatter/)
- [Word Counter](https://findutils.com/text/word-counter/)
