I have a bibliography on a subject (don't matter what subject it is, there is about 20 different files and about 1000 records). I need to convert it into csv (or any other table format which can be opened in Excel/LibreOffice Calc etc.)

Can anyone name a tool for this?


Open the .bib-files in Jabref and export them as OpenOffice .csv-files. You find the option under the menu File, Export


Since you can run Jabreffrom the program's home page, you don't have to install it. You need Java, though.

  • Thanks. Jabref is cool thing. It's a bit strange but still cool. – Georg Aug 31 '12 at 5:50

Best bet would be a scripting language, e.g. Python. I don't know if you are a programmer, but making a script taking each entry and converting them should be pretty quick (provided typing python script_file.py in the prompt doesn't scare you!). Python is also installed by default on most Unix OSes.

Here's a basic python script which accesses a few fields:

from pybtex.database.input import bibtex

#open a bibtex file
parser = bibtex.Parser()
bibdata = parser.parse_file("myrefs.bib")

#loop through the individual references
for bib_id in bibdata.entries:
    b = bibdata.entries[bib_id].fields
        # change these lines to create a SQL insert
        #deal with multiple authors
        for author in bibdata.entries[bib_id].persons["author"]:
            print(author.first(), author.last())
    # field may not exist for a reference

You can adapt it to your needs and save desired fields to a .csv file.

  • I already thought about it. But I'm looking for a existing tool for it. and, actually, I don't know any scripting language – Georg Aug 30 '12 at 18:02
  • Best part about python, Everything is already done. Thanks for the nice snippet – DJK Nov 27 '17 at 21:15
  • 1
    I like this solution. As an improvement I would suggest using b.get(field), since this avoids the KeyError exception. – Robin Keskisarkka Oct 10 '18 at 11:54

A python version using bibtexparser bibtexparser and pandas

with open('ref.bib') as bibtex_file:
  bib_database = bibtexparser.load(bibtex_file)
df = pd.DataFrame(bib_database.entries)
df.to_csv('ref.csv', index=False)

And a minimal working example:

import bibtexparser
import pandas as pd

bibtex = """@article{ einstein1935can,
            title={Can quantum-mechanical description of physical reality be considered complete?},
            author={Einstein, Albert and Podolsky, Boris and Rosen, Nathan},
            journal={Physical review},
            title={DANIEL: A deep architecture for automatic analysis and retrieval of building floor plans},
            author={Sharma, Divya and Gupta, Nitin and Chattopadhyay, Chiranjoy and Mehta, Sameep},
            booktitle={2017 14th IAPR International Conference on Document Analysis and Recognition (ICDAR)},

with open('ref.bib', 'w') as bibfile:
with open('ref.bib') as bibtex_file:
  bib_database = bibtexparser.load(bibtex_file)
df = pd.DataFrame(bib_database.entries)
df.to_csv('ref.csv', index=False)

It is also possible to do if you use a reference manager as Zotero. Then you can import a bibtex file. It will result in its own folder, and then you can export it to whatever format you want.

Just another solution :)


Another option in R is to use the package bib2df:

# Install bib2df

# Load bib2df

# Set path to .bib
# (Example data)
path <- system.file("extdata", "LiteratureOnCommonKnowledgeInGameTheory.bib", package = "bib2df")

# (Alternatively, your own file)
# path <- 'refs.bib'

# Read .bib as a data.frame
df <- bib2df(path)

# Parse the author and editor columns (list columns cannot be saved directly in a csv)
df$AUTHOR <- vapply(df$AUTHOR, paste, collapse = ' and ', '')
df$EDITOR <- vapply(df$EDITOR, paste, collapse = ' and ', '')

# Export to csv
write.csv(df, 'refs.csv')

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.