Add Prefix
Add text to the beginning of each line. Example: Add '- ' to create bullet lists
Input
Output
What It Does
The Add Prefix tool lets you instantly prepend any text, symbol, or string to the beginning of every line in your input. Whether you need to transform a plain list into a markdown bullet list, add a consistent label or tag to hundreds of log entries, or prepend a file path or URL base to a column of filenames, this tool handles it in seconds without any manual editing. Simply paste your multi-line text, type the prefix you want applied, and the tool outputs every line with your chosen text added to the front — no programming, no spreadsheet formulas, and no tedious find-and-replace gymnastics required. It's an essential utility for developers formatting code snippets, writers structuring outlines, data analysts cleaning exports, and anyone who regularly works with structured line-based text. The tool preserves your original line content exactly as written, only adding the prefix — it never alters spacing, punctuation, or existing characters within a line. Blank lines are handled gracefully, giving you full control over how your output looks. With support for any Unicode text as a prefix — including dashes, arrows, hashtags, spaces, or multi-character strings — the Add Prefix tool is deceptively simple yet remarkably versatile for a wide range of everyday text-processing tasks.
How It Works
The Add Prefix applies its selected transformation logic to your input and produces output based on the options you choose.
It applies a fixed set of transformation rules to your input, so the output is stable and easy to verify.
All processing happens in your browser, so your input stays on your device during the transformation.
Common Use Cases
- Converting a plain list of items into a markdown bullet list by prepending '- ' or '* ' to each line for use in documentation or README files.
- Adding a common URL base (e.g., 'https://example.com/') to a column of relative paths exported from a CMS or spreadsheet.
- Prepending log level labels such as '[INFO] ' or '[ERROR] ' to lines of application output before sharing with a team.
- Adding SQL comment markers ('-- ') to multiple lines of a query to quickly comment out a block without an IDE.
- Formatting a numbered or labeled outline by prepending chapter or section identifiers (e.g., 'Chapter 1: ', 'Section A: ') to topic lines.
- Batch-adding a CSS class prefix or namespace to a list of selectors when refactoring a stylesheet.
- Prepending a shell command (e.g., 'echo ') to a list of strings to quickly generate a script from plain text data.
How to Use
- Paste or type your multi-line text into the input field — each line will be treated as a separate unit that receives the prefix.
- Type your desired prefix into the prefix field. This can be a single character like '#', a symbol like '> ', a word, or any multi-character string including spaces.
- Click the convert or apply button to instantly generate the output with your prefix added to the start of every line.
- Review the output in the result area to confirm the prefix has been applied correctly across all lines.
- Copy the transformed text using the Copy button and paste it directly into your document, code editor, spreadsheet, or wherever it's needed.
Features
- Applies any custom prefix — from a single character to a full word or phrase — to every line simultaneously with one click.
- Preserves the original content of each line exactly, including internal spacing, punctuation, and special characters.
- Supports Unicode characters, emoji, arrows, and symbols as prefix values for maximum flexibility across different use cases.
- Handles large blocks of text efficiently, making it practical for processing dozens or hundreds of lines at once.
- Instant real-time output so you can see the result update as you type your prefix, without waiting or submitting a form.
- One-click copy functionality to transfer the prefixed output directly to your clipboard without manual selection.
- Works entirely in your browser with no data sent to a server, keeping your text content private and secure.
Examples
Below is a representative input and output so you can see the transformation clearly.
item1 item2 item3
- item1 - item2 - item3
Edge Cases
- Very large inputs may take a few seconds to process in the browser. If performance slows, split the input into smaller batches.
- Mixed formatting (tabs, line breaks, or inconsistent delimiters) can affect output. Normalize spacing first if needed.
- Add Prefix follows the selected options strictly. If the output looks unexpected, re-check option settings and input format.
Troubleshooting
- Output looks unchanged: confirm the input contains the pattern this tool modifies and that the correct options are selected.
- Output differs from a previous run: confirm that the input and every option match, because deterministic tools should repeat when the settings are identical.
- Unexpected characters: check for hidden whitespace or encoding issues in the input and try normalizing first.
- Slow processing: reduce input size or try a modern browser with more available memory.
Tips
When adding a prefix that should be visually separated from the original line content — like a bullet point or label — remember to include a trailing space inside your prefix string (e.g., '- ' rather than '-'). This keeps the output readable without requiring you to edit each line afterward. If you only want to prefix non-empty lines, scan your input first and remove stray blank lines before applying the tool. For code-related workflows, combining this tool with an Add Suffix tool lets you wrap every line with opening and closing tags or brackets in two quick passes.
Frequently Asked Questions
What does the Add Prefix tool do?
The Add Prefix tool takes a block of multi-line text and adds a custom string of your choice to the very beginning of every line. You provide the text and the prefix, and the tool outputs the transformed result instantly. It's useful for any situation where you need to apply a consistent label, symbol, or string to many lines at once without editing them one by one.
Can I use spaces or special characters as my prefix?
Yes, the prefix field accepts any text you type, including spaces, punctuation, symbols, arrows, hashtags, and Unicode characters. If you want your prefix to be visually separated from the line content, simply include a trailing space in your prefix value — for example, type '- ' (dash followed by a space) rather than just '-'. Multi-character strings like '[INFO] ' or 'https://example.com/' work equally well.
How is this different from using Find & Replace?
Find and Replace requires you to match existing text, which is only useful when your lines already start with a known pattern. The Add Prefix tool works on any text regardless of what each line begins with, because it targets the start of the line itself rather than specific content. For prepending to diverse lines with different starting characters, a dedicated prefix tool is faster and more reliable than regex-based find and replace.
Does the tool modify blank lines in my text?
Behavior with blank lines can vary by implementation, but most prefix tools either skip blank lines or apply the prefix to them as well. If you want to avoid prefixing empty lines, remove them from your input before applying the prefix. This gives you the most predictable output, especially when preparing text for markdown renderers or code files where blank lines have semantic meaning.
Can I use this tool to create markdown bullet lists?
Absolutely — this is one of the most common uses. Paste your list of items into the input field, type '- ' (including the trailing space) as your prefix, and the output will be a properly formatted markdown unordered list. You can also use '* ' for an asterisk-style list, or '1. ' if you want to start a numbered list format (though automatic numbering would require a separate tool).
Is there a limit to how many lines I can process at once?
Browser-based text tools generally handle thousands of lines without any performance issues since the operation is computationally simple. For extremely large files — tens of thousands of lines or more — you might notice a slight delay, but for typical document or dataset sizes the tool processes your input instantly. If you're regularly working with very large files, consider a command-line tool like sed or awk as a complement.