On-device AI — professional-grade, fully private.

Text Merging Tool

Merge text blocks and files with any delimiter

  • Nothing uploaded
  • Blocks and files together
  • Live preview at any size

Drop text files here

Up to 25.0 MB each · .txt · .text · .md · .markdown · .log · .csv and more

Add a block or drop some files to get started.

    Merge settings
    Source order
    Source order

    The merge always follows the list on screen.

    Delimiter
    Delimiter

    Inserted between sources, never after the last one. \n \r \t \0 \\ work in the field.

    Cleanup
    Remove duplicate lines

    Applied to each source before it is joined.

    Line endings
    Line endings

    Keep leaves every terminator exactly as it was.

    Per-source labels

    Placeholders: {{name}} · {{index}} · {{count}} · {{chars}} · \n makes a line break

    Output format
    Output format

    For applications that otherwise assume the local codepage.

    Decides the shape of the result and the file extension.

    Merge in groups of
    one output

    0 merges everything into one file. Any other number produces one file per group.

    Behaviour

    Off marks the result out of date instead of refreshing it.

    Free: up to 25.0 MB per file, 75.0 MB in total, 5 files at a time. Typed blocks are unlimited.

    What this tool does

    It joins pieces of plain text into one document, in an order you control, with whatever you want between them. The pieces can be blocks you type or paste, files you drop in, or a mixture of both in one list — which is the part most online mergers do not do, because they are built around a file picker and nothing else. Everything happens on your device: no upload, and the page keeps working once it has loaded even with the network switched off.

    • Blocks and files in one queue — type a paragraph, drop three log files, and merge all four together in the order you arrange them.
    • A delimiter that is really a delimiter — it goes between parts and never after the last one, so there is no trailing separator to delete afterwards.
    • Cleanup while you merge — trim edges, drop blank lines and remove duplicates in the same pass, instead of merging and then running three more tools.
    • A preview that does not depend on size — the result is drawn as a window of a few thousand characters, so a 75 MB merge previews as fast as a 75-character one.
    • Four output shapes — plain text, a numbered list, Markdown with a heading per source, or a JSON array with one entry per source.

    Choosing a delimiter

    The delimiter is the single decision that changes the result most, and the right one depends on what the merged file is for. A newline stacks paragraphs. A blank line separates sections the way most Markdown and plain-text readers expect. A comma or a tab builds a quick data-like line — quick, not correct, because neither quotes a value that already contains the separator; if that matters, the CSV merger is the tool that gets it right. "None" glues the parts together with nothing between them, which is what you want when you are reassembling something that was split mid-word.

    Presets, and what each one is for

    PresetInsertsTypical use
    Newline\nStacking lines, log tails, list items
    Blank line\n\nParagraphs, Markdown sections, chapters
    Space(one space)Rejoining a sentence that was split across lines
    Comma,A quick list — not a CSV row
    Comma + space, A readable inline list in prose
    Tab\tPasting into a spreadsheet cell row
    Pipe | Markdown table cells, log fields
    Semicolon;SQL-ish fragments, European list separators
    None(nothing)Reassembling a file that was split mid-word

    Escape sequences you can type

    The custom field is a text input, so a control character has to be written rather than pressed. Five sequences are understood: \n for a newline, \r for a carriage return, \t for a tab, \0 for a null and \\ for a literal backslash. They can appear anywhere in the field and mixed with ordinary characters, so a joiner of \n---\n is one entry rather than something you have to paste. Anything else after a backslash is left exactly as typed — \q stays \q — because silently deleting half of a delimiter is a worse outcome than showing you the thing you mistyped.

    Two output formats ignore the delimiter entirely, and the rail says so beneath the field when they are selected: Markdown separates sources with its own blank line and heading, and JSON puts them in an array where a joiner has no meaning.

    Ordering and grouping

    The merge follows the list on screen, top to bottom, always. What changes is how the list gets into that order.

    Natural order, not alphabetical order

    Sorting file names as plain text puts chapter10.txt before chapter2.txt, because "1" sorts before "2" one character at a time. That is the wrong answer for almost every real merge, since the files people merge are usually numbered: chapters, parts, dated log rotations, exported pages. Name order here compares embedded numbers as numbers, so chapter2 comes before chapter10 and part-9 before part-10. Names that sort equally fall back to a fixed comparison, so the order is the same every time rather than depending on which browser you opened.

    Merging into groups instead of one file

    Set "Merge in groups of" to a number and the queue is cut into consecutive groups of that size, each producing its own output with its own preview, statistics and download. Twenty chapters in groups of five give four volumes; forty daily logs in groups of seven give weekly files. Zero, or a number at least as large as the queue, produces the single output you would otherwise get — there is no separate mode to switch into. Duplicate-line removal is scoped to one output, so a line dropped from volume one is still present in volume two if that is where it belongs.

    Cleanup while merging

    Merged text is usually messier than either source was, because the joins are exactly where the ragged edges meet. Four options handle the cases that come up every time, and each one changes the preview as soon as you set it.

    • Include empty sources — off by default. An empty or whitespace-only source contributes nothing and no separator, so you never get two delimiters in a row. Turn it on when the empty slot is meaningful — a missing day in a series of daily files, for instance.
    • Trim source edges — removes leading and trailing whitespace from each source as a whole. It does not touch indentation inside the text, which is the difference between tidying a file and reformatting someone's code.
    • Drop blank lines — removes empty and whitespace-only lines everywhere, not just at the edges. Useful on scraped or copied text where every second line is empty.
    • Remove duplicate lines — adjacent collapses runs of the same line, which is what a repeating log needs. Across the whole output removes any line already seen in that output, which is what a merged word list or URL list needs.

    The order they run in

    The order matters and it is fixed, because a different order gives a different answer. Line endings are normalised first, so every later step sees one representation. Then the source is trimmed. Then blank lines are dropped — trimming can create a blank line, and doing it the other way round would leave that line behind. Duplicate removal runs last, on what survives. A document that ends without a final newline still ends without one afterwards; cleanup removes lines, and it does not add a terminator the source never had.

    Output formats

    The format decides the shape of the result and the file extension it downloads with. All four are free.

    FormatDownloads asUses the delimiterShape
    Plain text.txtYesThe parts, joined.
    Numbered list.txtYesEach part prefixed with its number.
    Markdown.mdNoEach source as a level-two heading, then its body.
    JSON array.jsonNoOne array entry per source.

    One entry per source is worth stating plainly, because it is where merge tools commonly go wrong: if a tool builds the joined string first and then splits it on newlines to make an array, the array has one element whenever the delimiter is anything but a newline, and a numbered list numbers lines instead of sources. Both look plausible and both are wrong. Here the formats are built from the parts, before any joining happens, so a comma-joined merge of three sources is an array of three.

    Encodings and line endings

    These are the two things that turn a correct merge into a file nobody can read, and both are invisible until they are not.

    What the byte-order mark decides

    A byte-order mark is a file stating its own encoding, so it wins over any guess. UTF-8, UTF-16LE and UTF-16BE marks are read and honoured, and the mark itself is stripped rather than merged into your text — otherwise every file exported as "CSV UTF-8" from Excel would contribute an invisible character at the top of its section. With no mark, the bytes are tested for valid UTF-8 and fall back to Windows-1252, which is what a Western-locale editor writes when nothing asked it for anything else. Each file's card shows the encoding that was actually used, so a surprising result has a visible cause. UTF-32 is named and refused rather than being decoded into nonsense, and a file whose bytes are not text at all — an image renamed with a .txt extension, say — is caught before it can decode into a screen of replacement characters.

    CRLF, LF, and why Notepad shows one long line

    Windows ends lines with a carriage return and a line feed; almost everything else uses the line feed alone. Merging files from both worlds gives a document with both, and older Windows editors render the LF-only half as a single unbroken line. Keep leaves every terminator exactly as it was, which is correct when the bytes must not change. LF and CRLF rewrite them all. When the sources disagree the line-endings section says so, rather than leaving you to discover it in the downloaded file. There is also an optional byte-order mark on the output, for the case where the merged file has to open cleanly in an application that assumes the local codepage.

    Blocks, files, and very large pastes

    A block you type and a file you drop are the same thing to the merge — a named piece of text in a list — but they are not the same thing to the browser, and the difference is worth knowing.

    When a block becomes read-only

    A text area holding a very large string costs the browser real time on every single keystroke, and that cost grows with the size of the string. A block that passes 200,000 characters is therefore moved out of the editor and into a windowed source card: the text is kept in full and merges exactly as before, the card shows the first few thousand characters, and the block can still be reordered, duplicated and removed. What it cannot be is typed into. The alternative is a tool that gets slower the more you paste into it until it stops responding, which is the behaviour this replaces.

    What can be dropped in

    Plain-text files of any kind: .txt and .text, .md and .markdown, .log, .csv and .tsv, .json, .xml, .yml and .yaml, .html and .htm, .css and .js, .srt and .vtt, .ini, .conf and .sql. The list is closed and it is checked at the file dialog, so a document that cannot be merged here cannot be picked here — and if you do get one through, the refusal names what it is, what the tool takes, and the one route that converts it. A .docx goes to Word to text, a .pdf to PDF to text, a spreadsheet to Excel to CSV.

    Limits, privacy and what runs where

    Nothing is uploaded and nothing is stored. Files are read on your device, merged off the main thread so the page stays responsive, and the result exists only in the tab until you copy or download it. Closing the tab is the whole of the cleanup.

    • Free — up to 25 MB per file, 75 MB across the queue, five files at a time — and unlimited typed blocks, because a block cap would restrict nothing that a second paste does not get round.
    • Pro — raises the file count and the size ceiling to what your device can handle, and delivers a group merge as one archive instead of one download per group.
    • Every setting is free — the delimiter, the ordering, all four cleanup options, line endings, headings, all four output formats and the group size are on both plans. What Pro buys is scale and delivery, never a capability.
    • Offline — once the page has loaded there is no further network traffic, so the tool works with the connection off.

    Merges run off the main thread on your device. The 75 MB reference set joins in 136 ms and only the first few thousand characters are drawn, so the page stays responsive whatever the size.

    When to use something else

    • For spreadsheet data with quoted values, use the CSV merger — a text join does not know that a comma inside a quoted field is not a separator.
    • For JSON documents that should be combined by key rather than concatenated end to end, use the JSON merger.
    • For Word, PDF or PowerPoint files, convert to text first; a binary container is refused here rather than being read as text.
    • When the join has to happen inside a database transaction, or depends on a rule this tool has no way to express, a script is the right answer.

    Frequently asked questions

    How does the text merger combine my blocks?

    Every block and file in the list is read top to bottom and joined in that exact order using the delimiter you choose. The delimiter goes only between parts, never after the last one, so you never end up with a trailing separator. Blocks that are empty or contain only whitespace are skipped by default so two separators never end up side by side; switch on Include empty sources if you need them kept.

    What delimiters can I use?

    Nine presets — newline, blank line, space, comma, comma and space, tab, pipe, semicolon and none — plus any custom string you type. The custom field understands backslash escapes, so \n is a newline, \t a tab, \r a carriage return, \0 a null and \\ a literal backslash. That means a multi-character joiner such as \n---\n is a single field entry rather than something you have to paste in. An escape the tool does not recognise is left exactly as you typed it rather than being silently dropped.

    Can I control the order the files are merged in?

    Yes, three ways. Manual order is the list as you arrange it with the up and down arrows. Name order sorts naturally rather than alphabetically, so chapter2.txt comes before chapter10.txt instead of after it — the difference that matters when you are merging numbered chapters or dated logs. Size order sorts by length. Name and size both have a descending variant, and every mode is free.

    Can I put a heading above each file in the merged output?

    Yes. The heading and footing fields take a small template: {{name}} is the source's file name, {{index}} its position, {{count}} the number of sources in that output and {{chars}} its length after cleanup. A heading of "=== {{name}} ===" puts a labelled divider above every file, which is what makes a merged log readable afterwards. Markdown output does this for you, turning each source name into a level-two heading.

    What output formats are available?

    Plain text joins the parts with your delimiter. Numbered list prefixes each part with its number. Markdown writes each source as a level-two heading followed by its body, and downloads as .md. JSON array writes one array entry per source and downloads as .json — one entry per source, which matters: a merger that split the joined string instead would return a single element whenever the delimiter was not a newline. Every format is free on both plans.

    Does it handle files that are not UTF-8?

    Yes. Each file's byte-order mark is read first and it overrides any guess, so a UTF-16LE file — what Excel and Notepad produce as "Unicode Text" — decodes correctly instead of turning into a column of nulls. With no mark the bytes are tested for valid UTF-8 and fall back to Windows-1252, which is what a Western-locale editor writes when nothing asked it for anything else. The card for each file shows which encoding was actually used, and a UTF-8 byte-order mark is stripped rather than being merged into your text.

    Can it fix mixed line endings?

    Yes, and it tells you when you have them. Windows files end lines with CRLF and Unix files with LF; merging the two produces a file that some editors show as one long line. Keep leaves every terminator exactly as it was, which is the right answer when the bytes must not change. LF and CRLF rewrite them all to one convention. When the sources disagree, the line-endings section says so rather than waiting for you to notice in the result.

    Can I remove duplicate or blank lines while merging?

    Yes. Trim source edges removes leading and trailing whitespace from each source without touching the indentation inside it. Drop blank lines removes empty and whitespace-only lines. Remove duplicate lines works two ways: adjacent collapses runs of the same line, which is what a log tail needs, while across the whole output removes any line that has already appeared in that output — scoped to one output file, so a group merge never drops a line from file two because file one already had it.

    Can I produce several files instead of one?

    Yes. Set Merge in groups of to a number and the queue is cut into groups of that size, each producing its own output — twenty chapter files in groups of five give four volumes. Each output has its own preview, statistics and download button. Pro adds a single archive containing all of them, which is the difference between one click and twenty.

    Is there a size limit, and does my text leave my device?

    Nothing is uploaded. Every merge runs on your device, off the main thread, and the tool keeps working with the network disconnected once the page has loaded. Free handles up to 25 MB per source, 75 MB across the queue and five files at a time, with unlimited typed blocks on both plans. Pro raises the file count and the ceiling to what your device can handle. The preview shows the first few thousand characters however large the result is, which is why a 75 MB merge stays responsive instead of freezing the tab.

    4.7out of 5

    from 1,535 ratings

    Rate this tool

    Tap a star — it takes a second