— Prepend & Append Text

Prepend and Append Text to Lines

Quick Tips

  • This tool runs entirely in your browser - your data stays private.
  • Press Ctrl+V (Cmd+V on Mac) to quickly paste text.
  • Use the Copy button to save your result to clipboard.
  • Bookmark this page for quick access!

Add text to the beginning or end of every line.

Examples

Input
line1
line2
line3
Output
// line1
// line2
// line3
Input
apple
banana
Output
<li>apple</li>
<li>banana</li>
Input
data1
data2
Output
INSERT INTO table VALUES ('data1');
INSERT INTO table VALUES ('data2');
Input
item
item
Output
- [ ] item
- [ ] item

Frequently Asked Questions

Yes, enter text in both the prepend and append fields to add content to both the beginning and end of each line simultaneously. Both operations are applied to every line in a single pass.

You can paste a tab character directly, or use \t in the input if escape sequence processing is enabled. The tool will add a tab character at the beginning of each line.

By default, empty lines receive the prepend/append text like any other line. You can enable the option to skip empty lines if you want them to remain empty in the output.

This tool adds the same text to every line. For sequential line numbers, use a dedicated line numbering tool. However, you can prepend a common prefix (like "Line: ") to prepare lines for further processing.

Prepend "- " (dash space) for unordered lists, or "1. " for ordered lists (though numbers won't increment). For task lists, prepend "- [ ] " to create unchecked checkbox items.

Cookie Preferences

We use cookies to enhance your experience. By continuing to visit this site you agree to our use of cookies.

Cookie Preferences

Manage your cookie settings

Essential Cookies
Always Active

These cookies are necessary for the website to function and cannot be switched off. They are usually set in response to actions made by you such as setting your privacy preferences or logging in.

Functional Cookies

These cookies enable enhanced functionality and personalization, such as remembering your preferences, theme settings, and form data.

Analytics Cookies

These cookies allow us to count visits and traffic sources so we can measure and improve site performance. All data is aggregated and anonymous.

Google Analytics _ga, _gid

Learn more about our Cookie Policy