Add Characters Before Each Line

Add custom characters or text before every non-empty line in your input. Useful for formatting, code, or preparing text for specific applications.

Results

Waiting for your input...

Instructions

  1. Paste or type your text into the input box. Each line will be processed.
  2. Example: apple\nbanana\ncarrot\npear
  3. Enter the characters or text you want to add before each line (e.g. ">> ", "- ", "# ").
  4. Click Convert to see your text with the specified characters added before each line.
  5. Example output (with ">> "): >> apple\n>> banana\n>> carrot\n>> pear
  6. All empty lines in your input will be ignored.

Frequently Asked Questions (FAQs)

What happens to empty lines in my input?

All empty lines are ignored. Only non-empty lines are processed.

Can I use any characters or text?

Yes, you can use any characters, symbols, or text as a prefix.

What if I leave the characters input empty?

If left empty, no characters will be added before each line.

Will the tool work with very large texts?

Yes, the tool is designed to handle large multi-line text inputs efficiently.

API Usage

API Usage

This tool provides an API for programmatic access.

Endpoint: POST /tools/add-chars-before/api/

Request Body: { "text": "apple\nbanana\ncarrot\npear", "chars": ">> " }

Response: The response will be the text with the specified characters added before each line. { "result": ">> apple\n>> banana\n>> carrot\n>> pear" }