Add Prefix & Suffix to Each Line
Last updated: March 16, 2026
A prefix and suffix tool adds custom text to the beginning or end of every line. Paste your text below and enter your prefix or suffix to transform all lines instantly.
Add prefix or suffix to every line of text. Preset buttons for quotes, parentheses, HTML li & more. Free online tool — no signup required.
Writers, students, bloggers, and anyone who needs to quickly transform text formatting without manual retyping.
100% free, runs entirely in your browser — no signup, no data sent to any server.
How to Use the Add Prefix Suffix Tool
Add Prefix Suffix Features and Options
About the Free Online Add Prefix Suffix
Output Preview
How to Add Prefix and Suffix to Text
1. Paste your text into the input box with one item per line. The tool accepts any text: names, URLs, file paths, code snippets, or plain words. Use the example button to see a demo list.
2. Enter a prefix and/or suffix. Type the text you want added before each line in the prefix field, and the text you want added after each line in the suffix field. Use one or both fields.
3. Use presets for common patterns. Click a preset button to instantly fill in the prefix and suffix for wrapping in quotes, parentheses, HTML li tags, bullet points, or trailing commas.
4. Copy the output. The right panel updates live as you type. Click the copy button to copy the transformed text to your clipboard, ready to paste into your editor, spreadsheet, or code file.
When to Use a Prefix/Suffix Tool
Programming and development: Wrap variable names in quotes to build SQL IN clauses, add commas to create CSV data, or prepend indentation to code blocks. Convert plain lists into HTML list items with <li> tags, or add semicolons to the end of CSS property lines.
Data formatting: Add quotation marks around each value for CSV or JSON formatting. Prepend column headers, add delimiters, or wrap entries in brackets for array notation. Transform raw data exports into structured formats ready for import.
Content creation: Add bullet points or numbered prefixes to plain text lists. Wrap items in parentheses for citations or references. Prepend emoji or symbols for social media formatting, or add hashtags before each keyword.
Batch file operations: Prepend file paths or directory names to file lists. Add extensions or suffixes to batch rename files. Build command-line arguments by prepending flags like --include= to each line in a list.
Database and SQL: Wrap values in single quotes for SQL INSERT statements. Add commas between values for bulk inserts. Prepend table names or schema prefixes to column lists for multi-table queries.
Markdown and documentation: Add list markers (-, *, or numbered) to lines for Markdown lists. Wrap text in backticks for inline code formatting. Prepend > for blockquotes or add indentation for nested structures.
Common Prefix and Suffix Patterns
Prefix: " Suffix: " — Turns each line into a quoted string. Essential for SQL IN clauses, JSON arrays, and CSV formatting.
Prefix: ( Suffix: ) — Enclose each line in parentheses for citations, mathematical expressions, or function arguments.
Prefix: <li> Suffix: </li> — Convert plain text lines into HTML list items. Paste into a <ul> or <ol> element for instant lists.
Prefix: • (bullet) — Add Unicode bullet characters before each line. Great for presentations, documents, and formatted text.
Suffix: , — Add a comma after each line for creating comma-separated values or array elements in code.
Use any text as prefix/suffix: square brackets, curly braces, XML tags, Markdown formatting, or multi-character strings.
Tips for Power Users
Chain with other tools: Use the Text Sorter to alphabetize your list first, then add prefixes and suffixes. Or use the Duplicate Remover to clean up your list before wrapping each line. Combine tools for complex text workflows.
SQL IN clause trick: Paste your values, set prefix to a single quote and suffix to a single quote followed by a comma. Copy the output, remove the trailing comma from the last line, and wrap in parentheses for a ready-to-use SQL IN clause.
Build arrays: Add prefix [ and suffix ], then paste the result into your code. For JSON arrays, wrap in quotes first, add commas, then manually add the outer brackets. Works for JavaScript, Python, PHP, and more.
HTML generation: Convert a plain list of items into HTML markup instantly. Use <li> tags for lists, <option> tags for select dropdowns, or <td> tags for table cells. Save time on repetitive HTML coding.
Markdown lists: Add "- " as a prefix to turn plain text into a Markdown unordered list. Use "1. " for ordered lists. Combine with the Text Cleaner to remove existing bullets before adding new formatting.
Batch commands: Prepend "mv " or "cp " to file names to build shell commands. Add target paths as suffixes. Generate entire batch scripts from a simple list of file names — just paste the output into your terminal.
Frequently Asked Questions About Add Prefix Suffix
How does this prefix/suffix tool work?
Paste your text with one item per line, then type a prefix (text added before each line) and/or a suffix (text added after each line). The output updates live as you type. Empty lines are preserved but not modified. All processing happens in your browser — nothing is sent to a server.
Can I add both a prefix and suffix at the same time?
Yes. Fill in both the prefix and suffix fields to wrap each line. For example, set prefix to '"' and suffix to '"' to wrap every line in double quotes. Use one or both fields depending on your needs.
What are the preset buttons?
Presets are one-click shortcuts for common wrapping patterns: wrap in double quotes, wrap in parentheses, wrap in HTML <li> tags, add a bullet point before each line, or add a comma after each line. Click a preset to fill in the prefix and suffix fields automatically.
Does the tool modify empty lines?
No. Empty lines (lines with only whitespace) are preserved in the output exactly as they appear in the input. Only lines with actual content receive the prefix and suffix. This keeps your text structure intact.
Can I use special characters or HTML in the prefix/suffix?
Yes. You can type any text into the prefix and suffix fields, including HTML tags like <li></li>, special characters, Unicode symbols, or even multi-character strings. The tool treats them as plain text and prepends/appends them to each line.
Is there a limit on input size?
There is no hard limit, but performance depends on your browser and device. The tool handles thousands of lines efficiently since all processing happens in memory. For very large files (50,000+ lines), consider processing in batches.
More Free Text Tools
FlipMyCase offers a suite of free browser-based text tools. Add prefixes and suffixes here, then use other tools for additional text processing.