Add Text to Each Line

Paste a list and add a prefix, a suffix, numbers, bullets or quotation marks to every line.

A sample. Type or paste your own.

Sample Your list 60 characters

- tent - pegs - mallet - torch - spare batteries - biscuits

6 lines changed. 1 empty line passed over.

Settings
Start from
More options numbers, quotation marks, commas
Numbers

Quotation marks

How it works

Paste a list and this tool will add text to each line: a prefix in front, a suffix behind, or both. Switches add numbers, quotation marks and a comma after every line but the last, and 18 presets cover the common jobs, from a bullet list to a quoted list for code. Empty lines are passed over unless you say otherwise. The result updates as you type.

Read the full guide

Prefix, suffix, or a preset to start from

Paste the list, then type what goes in front of every line in the prefix box and what goes after it in the suffix box, or tap a preset and change it from there. Spaces count: a hyphen and a space is a different prefix from a hyphen alone, so the boxes mark a space at either end. The sample opens on the dash list and runs from - tent to - biscuits, with the empty line in the middle left empty.

Numbers, letters and leading zeros

Numbering comes in three styles. Plain numbers start at 1 or wherever you tell them to. Leading zeros pad every number to the width of the last, so 120 lines run from 001 to 120 and still sort in order as text, where a plain 10 lands before 2. Letters run a) to z) and carry on with aa, ab. To put the number inside your own words, type {n} in the prefix: Item {n}: gives Item 1: tent, Item 2: pegs.

Quotation marks and commas for code

The quoted preset turns the sample into "tent", "pegs", and so on down to "biscuits", which gets no comma because it is last. Single quotation marks do the same for an SQL list. The tool does not escape a mark that is already inside a line, because the rules differ: CSV doubles it, JSON puts a backslash in front, SQL doubles the apostrophe. To put the list on one line afterwards, use remove line breaks.

  • The tool adds and never checks what is there. Run the bullet preset twice and every line has two bullets, so start from the plain list each time.
  • Trim removes spaces and tabs at both ends of every line before anything is added. The indent and comment presets switch it off so that code keeps its shape.
  • A comma typed in the suffix box goes on every line, the last included. The trailing comma switch leaves the last line without one, as a list in code wants.
  • The number on your last line equals the paragraphs figure in the paragraph counter: both count the lines that have something on them.
  • One line break at the very end of a pasted list is not treated as a line, so no stray bullet or extra number appears under the list.

Questions and answers

How do I add text to the beginning of every line?

Paste the lines and type the text in the prefix box. It appears in front of every line at once, spaces included. The suffix box does the same for the end of each line, and the two work together, which is how the HTML preset wraps every line in a pair of tags.

How do I add a comma to the end of each line?

Switch on the trailing comma. Every line gets a comma except the last, so the list can go straight into code or a query. Add the quotation mark switch for text values. If the last line needs one too, leave the switch off and type a comma in the suffix box.

What happens to empty lines?

They are passed over: nothing is added, they take no number, and they are ignored when the tool looks for the last line, so a list in two blocks is numbered straight through. Switch Skip empty lines off and an empty line is treated like any other.

Can the numbering start somewhere else, or use letters?

Yes. Set the start number, pick plain numbers, leading zeros or letters, and change the text after the number from a full stop to a bracket or anything else. Letters carry on with aa, ab after z, the way spreadsheet columns do.

Will the result work as Markdown?

The dash list, numbered list, checklist, quote marker and hard break presets are Markdown. A line starting with -, + or * is a bullet item, digits with a full stop or a bracket make an ordered item, and two spaces at a line end force a break. The bullet character and lettered lists are for plain text.

How is this different from removing line breaks?

Remove line breaks joins lines together. This page keeps every line and changes its start and its end. The case converter changes the letters and not the lines, and the text spacer touches only the empty lines.

All 18 presets

Lists 7

  • Bullet list U+2022 bullet and a space in front of every line. The bullet is a real character, so the list keeps its dots anywhere plain text goes: a message, a bio, a note. Markdown does not read it as a list marker. Use the dash list for that.
  • Dash list A hyphen and a space. In Markdown a line that starts with -, + or * and a space is a bullet list item, so this is the preset for a readme, a wiki page or any notes app that reads Markdown.
  • Lettered list a) b) c) in front of every line. After z it carries on with aa, ab, ac, the way spreadsheet columns are lettered. Markdown reads only digits as ordered list markers, never letters, so this preset is for plain text and documents.
  • Markdown checklist A hyphen, a space, square brackets with a space between them, and a space. Apps that support Markdown task lists draw every line as an empty tick box, and an x between the brackets ticks it. Where task lists are not supported the brackets show as typed.
Show all 18 presets (14 more)

Lists, continued

  • Numbered label Type {n} in the prefix or the suffix and the number goes there, not at the start of the line: Item 1: tent, Item 2: pegs. Change the word to Step, Day, Track or Q and the rest follows.
  • Numbered list 1. 2. 3. in front of every line. Empty lines are passed over and take no number, so a list in two blocks still counts straight through. Markdown reads digits followed by a full stop or a closing bracket as an ordered list item.
  • Numbered with leading zeros 01. 02. 03. The numbers are padded with zeros to the width of the last one, two digits at least, so 120 lines run from 001 to 120. Padded numbers sort in the right order when they are sorted as text, which plain ones do not: 10 lands before 2. Markdown accepts 01. as a list number and displays the list without the zeros.

Code and data 6

  • Comma after each line A comma after every line except the last and nothing else: for numbers and ids on their way into a query or a list in code, where quotation marks would be wrong. To put a comma on the last line too, type it in the suffix box and leave this switch off.
  • HTML list items Wraps every line in li tags. The result still needs a ul or an ol round it, because those are the elements a list item belongs in. The characters <, > and & inside a line are left as typed.
  • Line comment with a number sign U+0023 number sign and a space: a line comment in Python, Ruby, Perl, R and shell scripts. In Markdown the same two characters at the start of a line make a heading, so keep this preset for code.
  • Line comment with slashes Two slashes and a space, which start a line comment in C, C++, Java, JavaScript and the other curly-brace languages. Trimming is off, so the indentation of pasted code is kept behind the slashes and comes back when they are removed.
  • Quoted and comma-separated Double quotation marks round every line and a comma after each one except the last, ready to go between the square brackets of a list in code. A quotation mark already inside a line is not escaped for you: CSV wants it doubled and JSON wants a backslash in front of it, so check those lines by hand.
  • Single-quoted and comma-separated The same with single quotation marks, which is how SQL writes text values: paste the result between the brackets of an IN list. An apostrophe inside a value has to be doubled in SQL, and the tool does not do that for you.

A mark in front 2

  • Hashtag in front A number sign closed up to the start of every line, for tags written one to a line. A hashtag ends at the first space, so write sparebatteries and not spare batteries, or only the first word is tagged.
  • Quote marker U+003E greater-than sign and a space. Markdown reads lines that start this way as a block quote, and plain-text e-mail marks quoted lines with the same sign, one for each level of quoting. Empty lines are passed over, which in Markdown ends the quote there: switch Skip empty lines off to keep several paragraphs in one quote.

Spacing 3

  • Indent by four spaces Four spaces in front of every line. In Markdown, lines indented by four or more spaces after an empty line are a code block and are shown exactly as typed, which makes this the quick way to quote a command or a snippet.
  • Indent by two spaces Two spaces in front of every line that has text. Trimming is off for this preset so that lines already indented keep their shape and the whole block moves together. Empty lines stay empty, so no line is left holding nothing but spaces.
  • Markdown hard break Two spaces at the end of every line. They are invisible, and in Markdown they decide whether lines stay apart or are run together into one paragraph: a line end with two or more spaces in front of it is a hard line break. For an address, a poem or a signature.

How this list was compiled: Own work. The 18 presets are this site's own choice of the jobs people add text to every line for; each one is a setting of the same few controls (prefix, suffix, numbering, quotation marks, trailing comma, skip empty lines, trim). Every sample and every test pair in this file was computed from the sample list "tent, pegs, mallet, an empty line, torch, spare batteries, biscuits", and the numbering rules (leading zeros to the width of the last number, letters carrying on aa, ab after z) and the sort order of padded and plain numbers were checked. Character names: https://www.unicode.org/Public/18.0.0/ucd/UnicodeData.txt, version 18.0.0 (U+2022 bullet, U+0023 number sign, U+003E greater-than sign). Markdown facts follow the CommonMark specification, version 0.31.2 (https://spec.commonmark.org/0.31.2/): bullet list markers are -, + or *; an ordered list marker is 1 to 9 digits followed by a full stop or a closing bracket, a start number may begin with zeros and only the first number of a list is used; a block quote marker is > with an optional space; four or more spaces of indentation after a blank line make an indented code block; a line ending preceded by two or more spaces is a hard line break; # followed by a space opens a heading. The task list marker (square brackets holding a space or an x) is an extension to Markdown; its specification is named in the page notes. Quoting rules: CSV doubles a double quote inside a quoted field (RFC 4180, section 2, https://www.rfc-editor.org/rfc/rfc4180.txt); JSON escapes a quotation mark with a reverse solidus (RFC 8259, section 7, https://www.rfc-editor.org/rfc/rfc8259.txt); SQL bounds a string constant with single quotes and doubles a single quote inside it (https://www.postgresql.org/docs/current/sql-syntax-lexical.html). The li element is used inside ol, ul and menu elements (https://html.spec.whatwg.org/multipage/grouping-content.html#the-li-element). Line comment markers by language: https://en.wikipedia.org/wiki/Comment_(computer_programming). A space or a line end closes a hashtag: https://en.wikipedia.org/wiki/Hashtag. The > quote mark of plain-text e-mail and its quote depth: RFC 3676, section 4.5 (https://www.rfc-editor.org/rfc/rfc3676.txt). All checked 2026-09-19. Licence: own work