BibTeX Formatter & Validator

Pretty-print, validate, and sort your .bib bibliography — consistent indentation, sorted entries, aligned fields. Runs entirely in your browser, no server, no sign-up.

Formatted BibTeX

About this tool

This BibTeX formatter and validator tidies up your .bib bibliography files. Paste your BibTeX source and it parses every entry, reports any syntax error (unbalanced braces, a missing =, a truncated entry), then re-emits the whole file in a clean, consistent style — one field per line, indented, with the entry type and field names normalized to lowercase.

It runs entirely in your browser. Nothing is uploaded to a server, so even unpublished or sensitive references stay on your machine.

What it does

Supported entry kinds

Normal entries (@article, @book, @inproceedings, @misc, …) plus @string abbreviation definitions, @preamble blocks, and explicit @comment blocks. Free text between entries is dropped, matching standard BibTeX behaviour.

Tips

FAQ

Will formatting change the text inside my field values?

No. Field values are preserved byte-for-byte — protective {braces}, "quoted" values, bare numbers and #-concatenated @string macros all come through unchanged. Only the entry type (@ARTICLE@article, unless you turn "Lowercase the @entry type" off) and the field names are normalized to lowercase.

Where do @string, @preamble and @comment blocks go when I sort?

They stay at the front of the file, keeping their original relative order. Sorting (key or type-key) only reorders the normal entries among themselves, so abbreviations defined in @string are still declared before the entries that use them.

Why am I getting a "duplicate cite key" error?

Duplicate-key checking is on by default because two entries with the same key silently shadow each other in LaTeX. The error names the repeated key so you can rename one of them; if the duplicates are intentional, untick "Error on duplicate cite keys" and the file will format anyway.

Why did loose text between my entries disappear?

BibTeX itself treats anything outside an @entry{...} as an implicit comment, so the formatter drops free text between entries to produce a canonical file. If you need a comment to survive formatting, wrap it in an explicit @comment{...} block — those are kept.

Developer & Automation Access

Run it from the terminal

Same engine as this page, headless — via the gizza CLI:

gizza tool bibtex-format "@article{einstein1905, title={Zur Elektrodynamik bewegter Körper}, author={Einstein, Albert}, year=1905}"

New to the CLI? Get gizza →

Open it by URL

Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:

https://gizza.ai/tools/bibtex-format/?bibtex=%40article%7Beinstein1905%2C%20title%3D%7BZur%20Elektrodynamik%20bewegter%20K%C3%B6rper%7D%2C%20author%3D%7BEinstein%2C%20Albert%7D%2C%20year%3D1905%7D&sort=none&sort_fields=true&indent=2&align_values=true&lowercase_type=true&check_duplicates=true

Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.