Does Turnitin check code?

Turnitin is the plagiarism checker most institutions already license, so it is natural to ask whether it covers programming assignments too. It can find code copied word for word, but it is built for prose, and the simplest disguises programmers use get past it. This guide explains why, what Turnitin's Gradescope offers for code, and what a programming course needs to check code properly.

Checks every file against classmates, the web and AI, in 65+ languages.

The short answer

Partly. Turnitin's similarity check compares submissions as text. Code pasted or uploaded to it can match other text verbatim, so a straight copy of a file found online may show up. But a student who renames the variables, reformats the file or reorders the functions has changed most of the text without changing the program, and a text comparison will usually miss it. For programming work, a checker that compares program structure is the right tool.

This is not a criticism of Turnitin, which is very good at what it was designed for. It is a consequence of how text matching works, and it applies to every essay checker. Turnitin's product range also changes, so if your institution licenses a specific code feature, check its documentation for what it compares.

Why essay checkers struggle with code

An essay checker looks for sequences of words shared with other documents. Rewording an essay well enough to avoid that is slow and hard, because every sentence has to be rethought. Code is different. A handful of mechanical edits change almost every word in a program while leaving what it does untouched.

Change a student makesEffortEffect on a text comparisonEffect on a code comparison
Find and replace every variable nameMinutesMost words now differNo effect
Run a code formatterSecondsSpacing and line breaks differNo effect
Delete or rewrite the commentsMinutesLarge text changesNo effect
Reorder the functionsMinutesBreaks long runsMatched block by block
Exclude the starter code everyone sharesn/aMatched as copyingCan be left out

Code checkers turn each program into a sequence of tokens before comparing, replacing every name with a placeholder and discarding comments and layout, so the disguises above make no difference. The full mechanism is in how plagiarism checkers work.

There is a second, quieter problem: code is formulaic. Every Java file has the same imports and class declarations, every Python script the same main guard. A text checker can report high similarity between honest programs for that reason alone, while missing the disguised copy. That is the worst combination for a grader.

Gradescope's code similarity and MOSS

Turnitin also owns Gradescope, which many computer science departments use for grading. Gradescope offers a code similarity feature for programming assignments, built on MOSS, the long-standing academic similarity service from Stanford. Because MOSS compares program structure, it handles renaming and reformatting well.

Its scope is the thing to understand. It compares the submissions within an assignment with each other. Instructors report that it does not compare against previous terms, and it does not search the web, GitHub or Stack Overflow. So it catches students who share with each other, and misses a solution taken from a public repository or handed down from last year, unless you arrange separate checks. The wider gaps are covered in what MOSS misses, and tools are compared in MOSS vs Dolos vs JPlag.

What about AI-written code?

Code generated by ChatGPT, Claude or Copilot is new text, so it will not match anything in a similarity check, in Turnitin, Gradescope or any other tool. Detecting it needs a separate method that judges how the code is written.

AI writing detectors built for essays are the wrong instrument here. Code is regular by nature, and a prose detector reads that regularity as machine writing. A detector for code needs to be trained on code. Codequiry's is, and it reports a likelihood for each file with the reasons behind it. See how to tell if code is AI generated and how AI detectors work.

What a programming course needs from a checker

  1. Structural comparison between students, so renaming and reformatting do not hide sharing.
  2. Starter code excluded, so everything the class was given does not count as a match.
  3. A search of public code: the web, GitHub and Stack Overflow, with a link to each source.
  4. AI detection trained on code, reported separately from matches.
  5. Evidence you can show: side-by-side matches, and a dated record for cases that go further. See code examination reports.
  6. Your languages: Codequiry checks 65+.

Check this week's programming assignment

Structural matching between students, a search of the web, GitHub and Stack Overflow, and AI detection for code.

Using Turnitin and a code checker together

Most departments do not have to choose. A common arrangement is to keep Turnitin for essays, reports and dissertations, and use a code checker for programming assignments. Where a programming course also sets written work, such as design documents or lab reports, Codequiry can check that writing for copying in the same place as the code, which keeps the evidence for one course together.

Codequiry also has a REST API, a command-line client and a desktop app, so your own scripts or grading pipeline can send work to it. For a broader view of choosing a tool, read what a good plagiarism checker checks.

Frequently asked questions

Does Turnitin detect plagiarism in code?

Turnitin's main similarity check is designed for written work. Code submitted to it is compared as text, so verbatim copies can match, but renaming variables, reformatting or reordering functions usually breaks the match. Programming courses generally use a dedicated code checker for this reason. Turnitin's products change over time, so check what your institution's licence includes.

Does Gradescope check for code plagiarism?

Gradescope, which is part of Turnitin, offers a code similarity feature for programming assignments that is built on MOSS. It compares the submissions within an assignment with each other. Reports from instructors indicate it does not compare against earlier terms or search the web, so those need separate checks.

Can Turnitin detect ChatGPT-written code?

AI writing detection in text-focused tools is designed for prose. Code has different statistics, and a detector should be trained on the kind of content it judges. For AI-written code, use a detector trained on source code.

What do universities use to check code plagiarism?

Commonly MOSS or JPlag for comparing students with each other, sometimes through Gradescope or an LMS plugin, and commercial code checkers such as Codequiry when they also need web, GitHub and Stack Overflow searches, AI detection for code, and reports for integrity cases.

Should I submit code to Turnitin anyway?

It will catch some verbatim copying, so it is not useless, but a clean result is weak evidence. Students who copy code and change the names will usually not appear. A code checker is the better tool for programming work; Turnitin remains the better fit for essays and reports.

Can I use Codequiry alongside Turnitin?

Yes. Many courses keep Turnitin for written assignments and use a code checker for programming work. Codequiry can also check written work such as lab reports for copying, if you prefer one place for a programming course.

A checker built for code

Renamed and reformatted copies matched by structure, public code searched, and AI-written code flagged.

Start a check Pay as you go with credits. Comparing files is free.