Add Text to Each Line — Prepend & Append to Lines
Add prefixes, suffixes and numbering to text lines
This formatter splits source text at LF or CRLF line endings and applies the chosen prefix and suffix to each eligible line. Use it to label a checklist, wrap sample lines or prepare a plain-text list. It does not understand CSV quoting, SQL syntax, JSON serialization or shell escaping.
A worked template example
Enter alpha, a blank line, then beta. Choose 01, 02, 03 numbering, prefix [%N%] and suffix (%L%). With Skip Empty Lines enabled, the result is:
[01] alpha (5) [02] beta (4)
The blank line is retained unchanged; skipping means it is not decorated or included in numbering. If the prefix and suffix omit %N%, enabling numbering automatically prepends the number and a period. If numbering is None, %N% becomes empty.
Limits and troubleshooting
%L% counts the original line's UTF-16 code units, including its spaces, before decoration. It is not a count of visible Unicode symbols. Zero-padded numbering uses at least two digits and can grow with the source's total line count.
Whitespace-only lines are treated as empty when skipping is enabled and retain their whitespace. Disabling that switch decorates and numbers them too. Output uses LF line endings. A trailing source newline can therefore create an additional blank line to inspect.
Do not use simple quote prefixes as a general data serializer. Embedded quotes, commas or backslashes may need syntax-specific escaping. Review the transformed list before feeding it into another program. Very large inputs and prefixes can use substantial browser memory.
Processing and privacy
Formatting and UTF-8 text export run in browser memory without a line-formatting API request. The site still loads assets. Clear removes text, prefix and suffix; the numbering and empty-line settings remain selected for the next input.
Prepare an original packing-checklist exercise
Use three fictional source lines: brass washer, an empty line, then paper sleeve. Set a prefix of box colon followed by a space, and a suffix of a space followed by ready. With numbering disabled and Skip Empty Lines enabled, the two material lines receive the decoration while the empty separator remains empty. The expected first decorated line is box colon space brass washer space ready. Read the separator as part of the checklist rather than assuming skipping removes it. This exercise is useful for adding consistent review labels to an already prepared list without changing the list's underlying item names.
Compare placeholders with automatic numbering
Now choose one-based numbering and use item followed by the number placeholder and a colon as the prefix. The first eligible material receives number one and the second receives number two, even though an empty line separates them. Placeholders are replaced in the prefix and suffix, not parsed as instructions inside the original source. If neither decoration contains the number placeholder, enabling numbering adds its own number-and-period prefix. Save both candidates and compare them before deciding which convention a receiving checklist expects. Do not assume that adding a visible number creates a spreadsheet column, an ordered HTML list or a stable identifier for another database.
Inspect spaces, line endings and the final blank row
Add two leading spaces to the brass washer line and keep a trailing newline after paper sleeve. The original spaces remain part of that line and contribute to the line-length placeholder before decoration. A final source newline can create another empty row to inspect. CRLF input is split into the same lines as LF input, and the output is joined with LF. A standalone carriage return is not treated as another complete line-ending convention here. If exact original file bytes matter, retain the source and use a byte-oriented workflow rather than treating a visually similar transformed list as a lossless file conversion.
Treat character lengths as a stated convention
The line-length placeholder reports the original JavaScript string length of each line. That is a count of UTF-16 code units, including spaces, rather than a reliable count of visible symbols or UTF-8 bytes. An emoji can contribute more than one unit, and a displayed accented symbol can be represented in more than one way. Use plain fictional ASCII labels for an initial length exercise, then add a separate Unicode example deliberately. Document which measure the receiving process needs. Do not use this placeholder as a file-size validator or as proof that a third-party character limit will accept the decorated line.
Check an exported list against the source
Download formatted_lines.txt after the preview meets the checklist requirement. Open the actual saved file in a plain-text editor and compare the first material, the empty separator and the final material. Recheck the numbering after turning Skip Empty Lines off: blank or whitespace-only rows then participate in decoration and indexing. Reset All Fields clears the source and decorations while retaining the selected numbering and skip options. Those remaining choices can affect a new list, so inspect them before the next export. A downloaded filename or a successful copy does not establish that a different application imported the lines with the same interpretation.
Keep decoration separate from serialization and validation
Adding quote characters around a source line does not escape quotes already inside it. Likewise, placing commas, SQL punctuation or shell syntax in a prefix does not validate a generated program or data file. Use a format-aware serializer when the receiver expects CSV, JSON, SQL or another structured format. Here the narrow acceptance test is a correctly decorated plain-text checklist with documented empty-line and numbering behavior. Processing stays in browser memory without a line-formatting API, but saved files and clipboard copies persist separately. Use fictional labels while testing and retain the original list if another workflow will need its undecorated values.
Guide published by SimplyUtils. View our publishing information and contact details.