Adding a prefix to each line on Android means opening a browser-based text tool that decorates every line of a pasted block with literal text you supply, then downloading the result as a UTF-8 TXT file. The tool of record here is Add Prefix and Suffix to Lines, which runs locally inside Chrome, Samsung Internet, Firefox, and any other modern Android browser, so no APK install, no permission prompts, and no cloud upload are involved. You paste your block — a note from Google Keep, an email draft, a code snippet, a list of names, a transcript — and you supply a prefix, a suffix, or both. Every logical line in the input gets concatenated with those literal strings; CRLF, CR, and LF boundaries are recognized and normalized to LF in the output, and the original line order is preserved exactly. A live preview shows the exact transformed string, and a download button saves the result as a plain UTF-8 text file that opens directly in Google Files, Solid Explorer, or your editor of choice on the phone.

Why "Add a Prefix to Each Line on Android" Is a Real Workflow Need
Phones are not built around macros, regular expressions, or the keyboard shortcuts a desktop text editor offers. When you are typing on the on-screen keyboard, copying content between Android apps that do not share formatting, or sending a list to a colleague in an email or chat, the absence of a native "decorate every line" command becomes obvious the moment you try it. Pasting a three-line address into a Gmail signature is easy; turning the same three lines into quote-prefixed lines for a reply takes manual editing on a touch keyboard, character by character, and the tedium scales badly with the length of the list.
The same pattern shows up across the workflows people actually run on Android. A developer reading a Kotlin file in a code viewer on a tablet wants a comment marker in front of certain lines. A student copying an outline from Google Docs wants a dash before every bullet because the destination app does not auto-format. A community manager turning a list of usernames into clickable Markdown links needs square brackets and parentheses around each one. A support agent on a phone wants every reply line to start with a greater-than sign so the conversation reads like a quoted email thread. Each of these tasks is the same shape: take a block of lines, attach the same character sequence to the start (or end) of each one, save or share the result. A browser tool built for that exact shape solves them all in one move.
A Browser-Based Approach Beats a Native App on Android
Android offers many text utilities, but most of them either require a paid upgrade, demand storage or network permissions, or send your text to a remote server. A browser-based tool sidesteps all three concerns. Add Prefix and Suffix to Lines runs the decoration, the preview, and the file generation entirely inside the browser tab — the Blob that becomes your downloaded TXT file is created locally with JavaScript, not fetched from a remote endpoint. That means your pasted notes, code, or personal data never travel over the network and never touch a third-party log.
The browser approach also wins on compatibility. Any Android phone released in the last several years ships with a Chromium-based browser that supports the modern JavaScript and Web APIs the tool relies on, so the same workflow works on a budget Android Go device, a flagship Samsung Galaxy, a Pixel, and a tablet. There is nothing to update and nothing to grant. You bookmark the page if you want it, open it whenever you need it, and close the tab when you are done.
How to Add a Prefix to Each Line on Android
- Open your Android browser and navigate to Add Prefix and Suffix to Lines.
- Tap the input area and paste or type the lines you want to decorate — long-press the field and choose Paste, or use the on-screen keyboard.
- Type your prefix in the Prefix field, your suffix in the Suffix field, or fill in both. At least one must be non-empty.
- Decide what should happen to blank lines: keep the default that leaves empty or whitespace-only lines unchanged, or switch it off to decorate every logical line including blanks.
- Watch the preview region update with the exact output string — spaces, tabs, and line breaks are preserved as written.
- Tap the download button to save a UTF-8 TXT file. The file lands in your Android Downloads folder and can be opened by Google Files, any text editor, or shared into another app.
For richer examples of how this same step sequence turns raw lists into formatted output, the four real-world examples guide walks through the same tool applied to emails, code, Markdown, and SQL fragments.
What to Type in the Prefix and Suffix Fields
Both fields accept literal strings. That word "literal" is doing real work: it means characters such as brackets, dollar signs, backslashes, asterisks, and parentheses are inserted exactly as you typed them, with no regular-expression parsing, no replacement tokens, and no Markdown or HTML interpretation. If you type (*) in the prefix field, every line comes out as (*) your line, not as a list marker rewritten by some downstream parser. Each affix is limited to 200 Unicode characters, so emoji and non-Latin scripts work the same way Latin text does, but the total decoration per line is bounded.
| Goal | Prefix to type | Why it helps |
|---|---|---|
| Email reply quote | > | Standard quote prefix recognized by most mail clients |
| Plain bullet list | - | Renders as a bullet in Markdown and most note apps |
| Code comment | // | Valid comment syntax in Java, Kotlin, JavaScript, Go, Rust |
| Markdown header | # | Renders as a level-one heading on GitHub, Discord, and most static sites |
| Task list entry | [ ] | Renders as an unchecked checkbox in Markdown |
| Log line tag | [INFO] | Common bracketed log prefix for grep-friendly output |
| SQL literal list | ' prefix and ' suffix | Surrounds identifiers with single quotes for an IN clause |
| Shell session prefix | $ | Reads like a pasted shell session |
Each row above is a literal string the tool pastes in front of your lines exactly as shown — no escaping required, and no need to reach for a desktop editor to make the characters behave.
Output on Android — The TXT File You Download
The download button produces a plain text file with the exact transformed string from the preview. The file has no byte-order mark, no rich-text styling, no spreadsheet-style quoting, and no CSV escaping; it is the raw bytes of the preview rendered as UTF-8. That choice matters on Android because most on-device editors and file managers (Google Files, Material Files, Solid Explorer, the built-in Notes apps on Samsung and Pixel devices) treat the file as ordinary text and display it correctly the moment you tap it. If you need the content for a downstream format that has its own escaping rules — JSON, CSV, SQL — verify or escape the output separately, because the tool deliberately does not guess at your destination format.
If you edit the input, change the prefix or suffix, or toggle the blank-line policy after generating a result, the previous download is cleared and its URL revoked. That guardrail keeps an outdated result from being saved under a name that no longer matches what the controls describe, which is easy to miss on a phone where you might be juggling several browser tabs.
Settings That Change the Result on Mobile
The blank-line policy is the only toggle, but it has specific behavior worth knowing on a phone where your paste often contains stray whitespace from clipboard managers or notes apps. The table below summarizes the two states using the verified behavior of the tool.
| Setting | Empty line | Whitespace-only line | Line with content |
|---|---|---|---|
| Leave blank lines unchanged (default) | Returned exactly as empty | Returned with original spaces intact | Decorated with prefix and suffix |
| Decorate all logical lines | Decorated with prefix and suffix | Decorated with prefix and suffix | Decorated with prefix and suffix |
A trailing newline at the end of your pasted input creates a final empty logical line. With the default policy that line is left blank in the output; with the all-lines policy it receives the prefix and suffix. This behavior is deliberate so the boundary your paste represented is preserved in the file you download rather than silently dropped. Line endings from the input — Windows CRLF, classic Mac CR, or Unix LF — are recognized and normalized to LF in the generated text, which means the file behaves predictably whether you open it in Termux, in a notes app, or in a desktop editor later.
Limits Worth Knowing on Android
The input is capped at one million characters, which is enough for a long email thread, a transcript, or a chunk of code, but it does mean very large pastes from clipboard managers can hit the visible error and stop. Each prefix and suffix string is capped at 200 Unicode characters. Empty input and exceeded limits show visible errors rather than truncating your text silently. These constraints exist to keep browser memory use and on-screen rendering responsive during large transformations — important on a phone where the rendering thread is shared with the rest of the system.
The tool deliberately stays focused on one transformation: literal prefix plus original line plus literal suffix. If you want sequential numbers rather than a fixed prefix, that is a different task with a different tool: Add Line Numbers to Text numbers every line from a chosen starting value. If you want to replace one piece of text with another inside lines, the Find and Replace Text tool is built for substring changes. Keeping the scope narrow is what makes the prefix-and-suffix behavior predictable across the long list of scenarios people run into on Android.
If you're weighing options, Add Quotes to All Lines in Notepad++: The Paste-Back Fix covers this in detail.