ai-code-detector

Guide · manual signals · detector check

How to tell if code was written by AI

Maybe a student's submission looks nothing like their earlier work. Maybe a candidate's take-home reads unusually polished. Maybe you pasted something into an editor and a model wrote back more than you expected. The question is the same: did a person write this, or did a model?

Here is the honest starting point: no single signal settles that question. But several signals, read together, are genuinely informative. This page walks through the ones you can check by hand, explains where human judgment runs out, and shows how an AI code detector can add one more signal to the pile.

Skip to the three-step check ↓

Signals you can read by hand

None of these settles anything on its own. Each one is a reason to look closer, not a conclusion.

Signal 1 — Comments that restate the code

AI models tend to comment generously and uniformly: a docstring on every function, a comment on the obvious line, phrasing that paraphrases what the code already says. Human comments are usually sparser and more irregular — they explain why, not what, and they cluster where the code is actually tricky. Caveat: style guides and courses that mandate docstrings can make honest code look the same way.

Signal 2 — Naming that is perfectly generic

Model output favors clean, textbook names — data, result, temp, process_item — applied with machine consistency across a whole file. Human naming drifts: abbreviations appear, conventions shift halfway through, and names carry the author's habits. Caveat: auto-formatters and strict lint rules push human code toward the same uniformity.

Signal 3 — Structure that is too even

AI-generated files often show suspiciously consistent structure: every function roughly the same length, error handling wrapped around everything including the trivial, edge cases handled with identical boilerplate. Human files are lumpier — some parts polished, some parts held together with a TODO. Caveat: starter templates and scaffolded projects are uniform by design, not by authorship.

Signal 4 — A style that matches no one

If you have seen this person's earlier work, compare. A submission that suddenly uses unfamiliar idioms, a different indentation philosophy, or patterns the author has never used before is worth a conversation. This is the strongest manual signal — and the one a stranger cannot run.

Read together, these signals can tell you where to look. What they cannot tell you is where to stop.

Why manual reading is not enough

Manual signals work on one file, when you have time, and when you have the author's earlier work to compare against. They fall apart at volume — forty submissions due Tuesday — and they fall apart on rewritten code: deliberate edits, paraphrasing, and mixed human-AI authorship all weaken what the eye can catch. They are also easy to over-read. Boilerplate can look generic, and a careful student's honest code can trip every signal above.

That is the gap a detector is built for: not to replace your reading, but to give it a second, independent signal before you spend your time.

Run the code through a detector in three steps

  1. Paste the file into the checker on the home page — free, no account needed.
  2. Read the AI-likelihood score and the highlighted snippets that drove it.
  3. Treat the result as one more signal: compare it with what you saw by hand.

Screening signal only. Review flagged code before you act on it.

How to read the result

The score estimates how closely the code matches patterns associated with AI generation — it is a screening signal, not a verdict. A lower signal means the file looks consistent with human-written code in our evaluation set. A stronger signal means the file is worth a closer look, starting with the highlighted snippets. False positives and false negatives both occur: short snippets, common patterns, and heavily constrained assignments are the hardest cases.

If the result matters — a grade, an interview decision, anything that affects a person — review the flagged code with its author and ask them to walk you through it. For our evaluation status and known limits, read the accuracy and limits page.

Read how we think about accuracy and limits →

Questions

Can you tell for sure whether code was written by AI?

No. No manual signal and no automated detector can settle authorship with certainty. What you can do is stack signals — comments, naming, structure, a detector score — and let them tell you where a human review is worth the time.

Does a high AI-likelihood score mean the code is AI-written?

Not by itself. The score is a screening signal, not proof of AI use. False positives occur, especially with short snippets, boilerplate, and code written under strict style rules. Always review flagged work with the author before drawing conclusions.

Does detection work equally well in every language?

No. In our most recent evaluation, Python, Java, and C++ were tested with both human-written and AI-generated samples. HTML, JavaScript, and Lua had AI-generated samples but no human-written ones, so results in those languages are extrapolated and carry more uncertainty.

If someone edits AI-generated code, does the signal disappear?

It weakens. Deliberate rewrites, paraphrasing, and mixed human-AI authorship all reduce the signal — that is a known limit of every detector, ours included. It is also why a score should start a review, not end one.

Check the file in front of you

You have the manual signals. Add one more: paste the file, get an AI-likelihood score with highlighted snippets, and decide where your review time goes. Free, no account needed.