ETEvoraTools
Text Formatting

Add Prefix to Every Line

Add Prefix to Every Line normalizes CRLF to LF and concatenates the entered Prefix before every line string. Empty lines also receive it; an empty prefix makes no change. The tool does not skip blanks, number lines, interpret escape sequences, preserve CRLF, or validate that the prefix is safe for code, CSV, Markdown, or another format.

Runs locally — files stay on your device
Quick answer

Are blank lines prefixed?

Yes.

Line mapping includes empty records

Splitting a string around line breaks produces empty line strings for consecutive boundaries, and the prefix is applied uniformly.

How it works

lines(input).map(prefix + line) then join with LF.

Key concepts

Literal text

Backslash sequences are not interpreted.

Every line

Empty and whitespace-only lines are included.

When to use it

  • Add a comment marker to every simple line.
  • Create quoted list lines.
  • Insert a common text token.

When not to use it

  • Do not expect blank-line skipping.
  • Do not assume format-aware escaping.
  • Do not expect original CRLF retained.

Worked examples

Marker

Input
a\nb; prefix >
Expected output
> a\n> b

Each line changes.

Blank

Input
a\n\nb; prefix #
Expected output
#a\n#\n#b

Blank gets #.

Empty prefix

Input
a
Expected output
a

No change.

Common mistakes

Unexpected blank markers

Empty lines are mapped. Correction: Remove/handle blanks first.

Using as code commenting

Syntax/context is unknown. Correction: Use language-aware tooling.

Expecting escape interpretation

Input is literal. Correction: Enter actual desired characters.

Best practices

  • Preview blank lines.
  • Use a format-safe literal.
  • Keep original line endings if required elsewhere.

Related operations and differences

Add Suffix to Every Line

Choose Add Suffix to Every Line when you need to add the same suffix after every line.; use Add Prefix to Every Line specifically for add prefix.

Capitalize Every Word

Choose Capitalize Every Word when you need to capitalize the first character of every word.; use Add Prefix to Every Line specifically for add prefix.

Extract Email Addresses

Choose Extract Email Addresses when you need to find unique email addresses in text.; use Add Prefix to Every Line specifically for add prefix.

Extract URLs

Choose Extract URLs when you need to find unique HTTP and HTTPS links in text.; use Add Prefix to Every Line specifically for add prefix.

Line Counter

Choose Line Counter when you need to count the number of text lines.; use Add Prefix to Every Line specifically for add prefix.

Lowercase Converter

Choose Lowercase Converter when you need to convert every letter to lowercase.; use Add Prefix to Every Line specifically for add prefix.

Limitations and privacy

  • Literal prefix on every CRLF/LF-derived line; no blank skip, line filter, numbering, escape syntax, format awareness, or CRLF preservation.

Text is transformed locally in this browser and is not uploaded by the tool.

Frequently asked questions

Are empty lines changed?

Yes.

Is the prefix interpreted?

No.

Is CRLF preserved?

No, output uses LF.

Can prefix be empty?

Yes.

References