Duplicates found three ways
Entries are matched by citation key, by DOI, or by title and year, so the same paper is found even when two files give it different keys.
Merge .bib files into one, with duplicates removed by key, DOI or title, key clashes fixed and nothing uploaded.
or drag and drop .bib, .bibtex or .txt files here
Entries are matched by citation key, by DOI, or by title and year, so the same paper is found even when two files give it different keys.
When two different works share a key, the later one is renamed with a suffix. Every old key and new key is listed so you can update your \cite commands.
Removed duplicates, renamed keys, merged fields, @string conflicts and skipped entries are listed with file names and line numbers.
Your original files stay unchanged; the merged file is a new download.
Choose or drop .bib, .bibtex or .txt files, paste BibTeX, or try the sample files.
Each file shows its entries, parse errors, warnings and encoding. The order decides which copy counts as first.
Pick the duplicate rules, what to do with duplicates and key clashes, the sort order and the formatting.
The output is parsed again and checked, then offered as a download with a preview and a report.
No files at hand? The sample BibTeX files page has .bib files you can download and merge as a test. More tools for bibliography files are on the BibTeX tools page.
No. Your browser reads each .bib file, parses it and builds the merged file on your device. There is no upload and no account, and nothing is kept after you close the page. That matters for unpublished reference lists, notes in annote fields and abstracts you are not free to share.
Not with Keep original text, which is the default. Each kept entry is copied from @ to its closing brace exactly as it is in its file: field order, spacing, capitalisation, braces and LaTeX escapes stay the same. Only line endings are made uniform. Two things are rewritten. When a key is renamed, the key is replaced and the rest of the entry is left alone. When Merge fields adds fields to an entry, that one entry is written again with one field per line. Text between entries is not copied, and Tidy rewrites the layout of every entry but never the values.
A .bib file is a plain text database of references for BibTeX or biblatex. Each reference is one entry. An entry starts with @ and an entry type such as article, book, inproceedings, phdthesis or misc. Inside the braces comes the citation key, which is the name you write in \cite{...}, and then a list of fields in the form name = value, separated by commas.
@string{jmr = "Journal of Meridian Research"}
@article{halvorsen2019tidal,
author = {Halvorsen, Ingrid and Mart{\'i}nez, Jo{\~a}o},
title = {Tidal Mixing in Narrow Fjords: A Field Study},
journal = jmr,
year = 2019,
month = mar # "~14",
doi = {10.5555/jmr.2019.0421}
}A value can be wrapped in braces, wrapped in double quotes, or be a bare number. It can also be a macro: a short name defined once with @string and reused, like jmr above. The # sign joins parts, so mar # "~14" becomes March~14. Entry types and field names are not case-sensitive. Two more block types exist: @preamble holds LaTeX code for the bibliography, and @comment holds text that BibTeX ignores. Anything outside an entry is also ignored.
Few people keep one reference file for their whole career. The usual reasons you end up needing to merge bib files are:
smith2020, Smith2020a and smith_deep_2020.The result is several files that share many entries. LaTeX can read them side by side, but repeated keys cause errors and the same paper can be printed twice in the reference list.
halvorsen2019tidal. This is the only kind BibTeX itself notices, and it reports it as a repeated entry.https://doi.org/10.5555/ABC and 10.5555/abc are the same DOI.Matching on keys alone misses the second and third kind. It also makes the opposite mistake: two different papers by the same author in the same year often get the same key, such as garcia2020. Removing one of them as a duplicate would lose a reference. The BibTeX Merger treats that case as a key clash and renames the later entry to garcia2020a.
For two short files, copy and paste works. Open both, paste one under the other, then search for each key to find repeats. The risks grow with the size of the files. It is easy to delete the more complete copy of an entry, to cut an entry in the middle and leave an unbalanced brace, or to miss a duplicate that uses another key. An editor also does not tell you when two @string definitions disagree. If your files hold notes instead of references, the TXT Merger and the Markdown Merger join plain text and Markdown files, and Merge Word Files joins .docx chapters.
Because text outside entries is ignored, you can combine bib files by writing one after another. These commands do that and nothing else: they do not remove duplicates, check syntax or convert encodings.
# Linux and macOS: join the files, with a line break after each one
awk 1 thesis.bib paper.bib coauthor.bib > merged.bib
# cat does the same when every file ends with a line break
cat thesis.bib paper.bib coauthor.bib > merged.bib# Reads the files line by line and writes UTF-8.
# PowerShell 7 writes no byte order mark; Windows PowerShell 5.1 adds one.
Get-Content thesis.bib, paper.bib, coauthor.bib -Encoding utf8 |
Set-Content merged.bib -Encoding utf8BibTool is a command-line program for sorting and cleaning BibTeX files. It reads several input files and writes one output file. With -s it sorts the entries, and with -d it checks for double entries, which it finds by comparing sort keys. By default the sort key is the citation key, so it does not match the same paper under two keys unless you configure a different sort format.
# Read several files, sort by key (-s), check for double entries (-d)
bibtool -s -d thesis.bib paper.bib coauthor.bib -o merged.bib
# Also delete the double entries instead of only reporting them
bibtool -s -d -- 'check.double.delete = on' thesis.bib paper.bib -o merged.bibbibtex-tidy is a formatter that runs under Node.js. It can find duplicates by key, DOI, citation or abstract and merge them. It works on a single file and reformats every entry, so join the files first and keep a copy of the originals. Run npx bibtex-tidy --help to see the options in your version.
# bibtex-tidy works on one file, so join the files first
cat thesis.bib paper.bib coauthor.bib > merged.bib
# Merge entries that share a key or a DOI. The file is rewritten in place.
npx bibtex-tidy --duplicates=key,doi --merge=combine merged.bibYou can also skip the merge and load both files in LaTeX. This is fine when the files do not overlap; it does not remove duplicates.
% BibTeX: several files, no merge needed
\bibliography{thesis,paper}
% biblatex: one line per file
\addbibresource{thesis.bib}
\addbibresource{paper.bib}JabRef is a free desktop reference manager that stores its library as a .bib file. You can import a second file into the open library and then run its find duplicates command, which shows each suspected pair side by side and lets you choose what to keep. That is the best route when you want to review every pair by eye, or when you already manage your library in JabRef.
The browser tool fits a different job: merge bibtex files in one pass, with rules you set once, on any computer, with nothing to install. It does not ask about each pair. Instead it applies the rules and writes a report of every removed, renamed and skipped entry, so you can check the decisions afterwards. It also keeps the original text of your entries, where a reference manager usually rewrites the whole file in its own style. To try it without your own data, download test files from the sample BibTeX files page; other formats are on the sample files page.
\cite commands that meant the renamed entry.The tool lists each problem with its file name and line number. An entry with a syntax error is skipped, and the entries after it are still read.
| Problem | Cause | Fix |
|---|---|---|
| Unbalanced braces: a { is never closed | A closing brace is missing in a title or abstract, so the value runs into the next field or the next entry. | Go to the line in the message and count the braces in that field. The tool skips only this entry and continues at the next line that starts with @. |
| Missing comma after a field | Two fields follow each other with no comma between them. This happens often after pasting a field by hand. | Add a comma at the end of the earlier field. A comma after the last field is allowed, so you can end every field with one. |
| Missing citation key | The entry starts with a field, as in @article{title = ..., so there is nothing to cite. | Add a key and a comma right after the opening brace. |
| Unterminated string | A value starts with a double quote that is never closed, or a quote inside a quoted value is not wrapped in braces. | Close the quote, or write a quote inside the value as {"}. Using braces around the whole value avoids the problem. |
| An @ in an abstract or an email address | Inside a braced value an @ is harmless. In free text between entries, an @ followed by a word and a brace is read as the start of an entry. | Keep notes that contain @ inside a field or inside an @comment block. |
| Accented letters show as wrong characters | The file was saved in one encoding and read in another, for example Latin-1 text read as UTF-8 by an editor. | Check the encoding label on the file row. The tool reads invalid UTF-8 as Windows-1252 and writes UTF-8. LaTeX escapes such as {\"u} are never affected. |
To find a reported line in a very large .bib file, the Large Text File Viewer jumps to a line number without loading the whole file. The same idea of merging with duplicate removal is available for other formats: the JSONL Merger for JSON Lines, the JSON merger for JSON files, and the VCF Duplicate Remover for contact files. All bibliography tools are listed on the BibTeX tools page.
Get test files, see more BibTeX tools, or merge the other text files in your project.