What is the AUX file format?
An .aux file is a plain-text auxiliary file automatically generated by LaTeX during document compilation. It acts as a communication channel between successive compilation passes, storing data that LaTeX writes on one run and reads back on the next to resolve forward references.
The .aux file contains a sequence of LaTeX macro calls, most commonly:
\newlabel{key}{{number}{page}}- stores cross-reference data for\refand\pageref\citation{key}- records every\cite{}call found in the document\bibcite{key}{label}- stores resolved citation labels returned by BibTeX or Biber\@writefilecommands - writes entries for the table of contents (.toc), list of figures (.lof), and list of tables (.lot)
Because LaTeX resolves cross-references by reading the .aux from the previous run, at least two compilation passes are required to produce correct reference numbers. A third pass may be needed after BibTeX or Biber processes citations.
The .aux file is a compilation artifact - users never create or edit it manually. If it becomes corrupted (for example after an interrupted compile), deleting it and recompiling resolves most LaTeX errors. It should be excluded from version control (add .aux to .gitignore). Tools such as latexmk manage multiple passes and .aux handling automatically.
The format is compatible with all standard LaTeX engines: pdflatex, xelatex, and lualatex.
Security & safety
RISK: LOWPlain text file containing only LaTeX macro calls - no executable code. A maliciously crafted .aux file could in theory inject arbitrary LaTeX commands if a user manually inputs it to LaTeX, but this is an extremely theoretical attack vector. In normal LaTeX workflows, .aux is generated and consumed by the LaTeX engine itself.
Format details
in a nutshell- AutoCAD auxiliary file - AutoCAD and other CAD programs use .aux for auxiliary/helper data files, unrelated to TeX.
- Windows auxiliary file (system) - Various Windows applications use .aux as a generic auxiliary/helper data extension.
Programs that open AUX files
Technical details
deep spec| Encoding | Plain text (UTF-8 or ASCII depending on LaTeX installation and document encoding) |
| Format type | Plain-text LaTeX macro syntax - readable in any text editor |
| Container | None - bare text file |
| Generated by | pdfTeX, XeTeX, LuaTeX during LaTeX document compilation |
| Typical first line | \relax, or the first \citation{} command if the document has citations |
| Cross-reference macro | \newlabel{key}{{number}{page}} - written by LaTeX, read back to resolve \ref and \pageref |
| Citation recording | \citation{key} written during first pass; read by BibTeX or Biber to generate the .bbl file |
| Multi-pass requirement | Minimum 2 LaTeX runs needed for correct cross-references; 3+ when bibliography tools are involved |
| Typical file size | 1 KB - 500 KB (grows with document length and number of cross-references and citations) |
| OS compatibility | Windows, macOS, Linux (cross-platform - identical format across all TeX engines) |
| Manual editing | Not intended for manual editing - generated and managed entirely by the LaTeX engine |
| Safe to delete | Yes - automatically rebuilt on next compilation run; delete to force clean recompilation |
| Released | 1978 (TeX 1.0 by Donald Knuth); LaTeX extension by Leslie Lamport, 1984 |
| Latest version | N/A - format is a side-effect of TeX/LaTeX compilation, not versioned |
| Open standard | Yes · royalty-free |
| Specification | www.latex-project.org |
AUX conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about AUX files.