Concatenate Text

Combine two columns of text line by line with a custom separator, prefix, and suffix.

Online Concatenate Text Tool

This tool concatenates/joins two columns of text line by line with a separator of your choice.
Paste or type your text in "Column A" and "Column B", set the separator, prefix, and suffix, and press the "Combine" button.
Your text from the both columns will be merged and displayed in the "Output" field.


Load an example

Added at the beginning of each combined line

Placed between Column A and Column B

Added at the end of each combined line

Ready to concatenate text.


Overview

The "Concatenate Text" tool is a free online utility that lets you combine two columns of text line by line. Each line from Column A is joined with the matching line from Column B using a separator you choose - a space by default. You can also add a prefix at the start and a suffix at the end of every merged line.

This is different from simply joining all lines into one. The tool connects matching rows from two separate lists, making it perfect for merging first names with last names, pairing IDs with values, or connecting any two parallel text lists side by side.

Everything runs locally in your browser, so your text is never uploaded or stored. The tool is free, needs no account, and works on any device with a modern browser.


How to Use This Tool

1. Enter your text: Paste or type your first column into "Column A" and your second column into "Column B". You can also upload a text file for each column, or click "Load an example" to try a sample.

2. Set the separator: The separator field is pre-set to a space. Type any other character or string (such as ", " or " - ") to connect the two columns with it.

3. Add prefix and suffix (optional): Enter text in the "Prefix" field to prepend it to every combined line, or in the "Suffix" field to append it.

4. Exclude empty lines (optional): The "Exclude Empty Lines" switch is on by default. It skips blank lines from both columns when combining.

5. Combine: Click the "Combine" button. The merged result appears in the "Output" field with a message showing how many lines were combined. Copy or download the result, and use "Clear" to start over.


Examples

Every example below loads its own text and options - click "Try it", then press the "Combine" button.

1. Join first names with last names

Concatenate two columns of names using a space as the separator to form full names.

Column A
Sarah
Anthony
William
Steven
Column B
Mitchell
Edwards
Johnson
Davis
Output
Sarah Mitchell
Anthony Edwards
William Johnson
Steven Davis

2. Pair color names with hex codes

Connect color names to their hex values with an arrow separator.

Column A
Red
Green
Blue
Column B
#FF0000
#00FF00
#0000FF
Output
Red -> #FF0000
Green -> #00FF00
Blue -> #0000FF

3. Combine IDs with names using a prefix

Wrap each merged line with brackets using a prefix and separator.

Column A
101
202
303
Column B
Alice
Bob
Charlie
Output
[101] Alice
[202] Bob
[303] Charlie

4. Connect items with a suffix

Add a suffix to every combined line to append extra text at the end.

Column A
apple
banana
cherry
Column B
1 kg
2 kg
0.5 kg
Output
apple - 1 kg each
banana - 2 kg each
cherry - 0.5 kg each

Features & Options

Two Input Columns: Paste or type text into "Column A" and "Column B". Each line in Column A is paired with the corresponding line in Column B. Columns can have different lengths - the shorter one is automatically padded with blank lines.

Separator (default: space): The text placed between each pair of lines. The lines "Sarah" and "Mitchell" combined with a space become "Sarah Mitchell". Use ", " for a comma list, or " - " for a dash connection.

Prefix: Text added at the beginning of every combined line. For example, a prefix of "[" with lines "101" and "Alice" gives "[101] Alice" (with the default space separator).

Suffix: Text added at the end of every combined line. For example, a suffix of " each" appends that text after every merged line.

Exclude Empty Lines (on by default): When enabled, the tool skips blank lines from both columns before combining. This prevents extra gaps in the output.

Load an Example: Loads a sample pair of columns into the input fields so you can test the tool instantly.

Upload Files: Read a text file from your device into either column - useful for joining saved data files.

Copy & Download: "Copy" puts the output on your clipboard; "Download" saves it as a text file.

Mismatched Lengths: If one column has more lines than the other, the shorter column is padded with empty strings. A warning message notes the difference so you can adjust if needed.


When to Use This Tool

Combine a column of first names with a column of last names to create a full-name list for emails, forms, or databases.

Join a list of product names with their prices or quantities to build a quick inventory overview.

Merge two spreadsheet columns that you copied as plain text, without fighting formulas or import wizards.

Connect IDs, codes, or keys with their corresponding labels for documentation or configuration files.

Pair a list of questions with answers, or items with descriptions, to create structured content quickly.


FAQs

FAQ 1: How is this different from the "Join Text" tool?
Answer: "Join Text" takes a single column and joins all its lines into one continuous string. "Concatenate Text" takes two separate columns and merges each matching pair of lines side by side, keeping the line structure intact.

FAQ 2: What happens if my two columns have a different number of lines?
Answer: The tool uses the longer column as the reference and pads the shorter one with blank strings. For example, if Column A has 5 lines and Column B has 3, the last two output lines will have content from Column A with an empty Column B value. A warning message tells you about the mismatch.

FAQ 3: Can I concatenate more than two columns?
Answer: This tool is designed for two columns at a time. If you need to combine three or more, you can concatenate the first two, then use the output as one column in a second pass.

FAQ 4: How do I create a comma-separated list from two columns?
Answer: Set the separator to ", " (a comma and a space). Each output line will then read as "ColumnA value, ColumnB value".

FAQ 5: What does "Exclude Empty Lines" do?
Answer: When enabled, blank lines are removed from both columns before combining. This prevents output lines that consist of only a separator, prefix, or suffix with no actual content from either column.

FAQ 6: Is my text private?
Answer: Yes. The tool runs entirely in your browser with JavaScript. Your text is never uploaded to or stored on our servers.

TextToolz

The Ultimate Text Tools

TextToolz works seamlessly to let you convert and design your text. It is fast, reliable and secure. Trusted by thousands of users.