LaTeXdiff Online

Free. No signup. No Perl to install.

Compare two LaTeX files, or two versions of a whole project, and get a new .tex file with every addition and deletion marked. It runs the real latexdiff on our server, so you need no Perl, no terminal and no TeX installation to make the diff.

Original
Revised
Advanced options Marking style, change blocks, floats, math

Files stay private. We process the diff and discard the input immediately.

How to run latexdiff online

Step 1

Add both versions

Paste the original and the revised .tex side by side, or use Open .tex file. For a project split into several files, switch to Upload project (.zip) and add a .zip of each version.

Step 2

Generate the diff

The default settings suit most papers. Advanced options change how changes are marked (see below).

Step 3

Use the result

The diff opens with the changes highlighted. Copy it, Download .tex, or Open in Overleaf to compile it straight away.

Your files are processed and discarded straight after the diff is made.

How to compile the diff

The result is LaTeX source, not a PDF, so you compile it like any other .tex file. With the default settings, additions come out blue with a wavy underline and deletions red and struck out.

A paper in one file: use Open in Overleaf. It creates a new Overleaf project with the diff, ready to compile.

A project with figures, a custom class or a .bib file: the diff needs those files to compile.

  1. Download the diff (diff.tex).
  2. Put it in the project's main folder, next to your main .tex file. In Overleaf, upload it into the project.
  3. Compile diff.tex instead of your main file (in Overleaf, set it as the main document). Use the same engine as your paper and run BibTeX or Biber as usual, so citations resolve.

The diff loads the ulem package for the strike-through. TeX Live, MiKTeX and Overleaf all include it.

Advanced options

SettingChoicesWhen to change it
Marking styleUNDERLINE (default): additions blue and wavy-underlined, deletions red and struck out. CFONT: additions blue in sans-serif, deletions red and very small. CTRADITIONAL: additions blue in sans-serif, each deletion as a red footnote. CHANGEBAR: no text markup, a bar in the margin. BOLD: additions in bold, deletions hidden. PDFCOMMENT: deletions as PDF comments.When the journal asks for a particular look, such as margin bars. PDFCOMMENT shows differently in each PDF viewer, so use it only for a few changes.
Change blocksCOLOR (default): whole changed blocks in blue and red. SAFE: no extra marking. DVIPSCOL: for latex + dvips only, not pdfLaTeX.Pick SAFE first if your journal class makes the diff fail to compile.
Float handlingIDENTICAL (default): figures and tables marked like the text. FLOATSAFE: simpler marking inside floats. TRADITIONALSAFE: for the CTRADITIONAL style, because footnotes do not work inside floats.Pick FLOATSAFE if a figure or table causes an error.
Math markupcoarse (default): a changed equation is marked as one block. fine: the changed symbols inside the equation. whole: the whole equation, every time. off: math changes are not marked.Pick fine to show small algebra edits. It can break long align environments, so go back to coarse if it does.

What latexdiff marks, and what it cannot

latexdiff is a Perl script that compares two LaTeX files and writes a third one. It is not a line-by-line text diff: it understands LaTeX, so it compares words, commands and equations, and the output still compiles.

  • Text, headings, citations and equations are marked where they changed.
  • Figures: a new figure, or one whose file name or options changed, gets a blue frame. An image you replaced under the same file name looks unchanged, because latexdiff reads the source, not the image.
  • Your .bib file is not compared. Citations you added or removed in the text are marked.
  • Comments (text after %) never print, so changes to them do not show in the PDF.

Limits: 500 KB per .tex file; a project .zip up to 5 MB, 4 MB unpacked and 100 files; 30 seconds per diff. In a .zip, the main file is found automatically: the one with \documentclass and \begin{document}, with a main.tex in the top folder preferred.

latexdiff and Overleaf

Overleaf has no latexdiff button, but the two work well together:

  • To compare two versions of an Overleaf project, download each one: File > Download as source (.zip). For an older version, open History, choose All history, then use the menu on that version and Download this version. Upload both .zip files here.
  • To compile the diff, use Open in Overleaf, or upload diff.tex into the project as described above.
  • To run latexdiff inside Overleaf on every compile, Overleaf's guide How to use latexdiff on Overleaf shows a setup with a latexmkrc file.

On Overleaf's free plan, History keeps only the last 24 hours plus versions you labeled. Label the version you send to a journal or supervisor (Label this version, in History) so you can download it later.

Frequently asked questions

No. latexdiff runs on our server. You only need a browser, and a LaTeX setup or Overleaf to compile the result.

No. diff compares text line by line and knows nothing about LaTeX, so one changed word can mark a whole paragraph. latexdiff compares words, commands and equations, and writes a .tex file that compiles into a marked-up PDF.

Usually it is missing files: compile it inside your project, next to your figures, class file and .bib. If it still fails, the journal class may clash with the markup: set Change blocks to SAFE, or Float handling to FLOATSAFE, and generate the diff again.

Yes. The diff is between whichever two versions you add, so skipping the drafts in between is fine.

Yes. Download each project as a .zip (File > Download as source (.zip)) and upload both under Upload project (.zip).

It is free and needs no signup. Your files are processed to make the diff and discarded straight after.

Need the whole paper formatted in LaTeX?

Our LaTeX experts format papers and theses for journals and universities by hand, with no upfront payment. 1,100+ clients in 40+ countries.

See our LaTeX services

Related tools