Utilities
Format and deduplicate a BibTeX file
bibtex-format is an offline BibTeX formatter with DOI and citation-key deduplication.
overview
What bibtex-format does
Clean, normalize and deduplicate a BibTeX file with K-Dense's citation-management formatter (canonical field order and alignment, page-range fixes, DOI duplicate removal, optional sort and citation-key rewrite). Offline.
Normalize field order, align equals signs and convert page ranges such as 10-20 to 10--20. Duplicate entries are removed by case-insensitive DOI or identical citation key. Different keys without matching DOIs are retained even when their titles match.
The input limit is 16 MiB. Optional sort accepts key, year, author or title. Rekey defaults to false; enabling it changes citation keys before deduplication and can break existing document citations. Input with no parseable entries fails without output.
Packaged version: 065b734. Upstream license: MIT.
use cases
Where bibtex-format fits
Normalize bibliography layout
Align fields and normalize page ranges in a local BibTeX file.
Remove DOI duplicates
Collapse entries sharing a DOI even when DOI letter case differs.
Sort entries for review
Choose year, author, title or citation-key ordering.
reference
bibtex-format inputs and flags
| Name | Type | Flag | Description |
|---|---|---|---|
| input | FILE | --input | BibTeX file, maximum 16 MiB. |
| sort | STRING | --sort | Optional sort field - key, year, author or title. |
| rekey | STRING | --rekey | true to rewrite citation keys to the AuthorYearWord scheme before deduplicating (default false). |
Showing key inputs. bibtex-format exposes 3 inputs in total.
example
Run bibtex-format
python3 /app/run.py --input ./input.txt --sort year ./outputguidance
Choosing bibtex-format
Use bibtex-format to clean a local bibliography. It does not search for papers, resolve DOIs, verify references or establish that two differently keyed entries describe the same work.
faq
bibtex-format questions
related
More Utilities tools
browser-fetch
Headless Chromium render: requested URL, final URL, status, and title next to the page.
cewl
Spider a URL and return a wordlist for password crackers.
csvkit
SQL on one CSV. The table name is the file stem.
dnsgen
Wordlist and mined-word subdomain permutation.
duckdb
In-process SQL on CSV, JSON, and Parquet. No server.
edge-tts
Microsoft Edge neural speech from text or a script file. No API key.
Run bibtex-format yourself
The saved synthetic verifier confirmed sorted keys lee2018 and smith2020, removal of a case-variant DOI duplicate and normalization of a page range. The complete formatted bibliography was not retained. The command shows the container entrypoint with example paths.
Facts on this page come from the live Trickest tool library.