Unravel: understand the Java you paste
Learn what the code does instead of just getting an answer. Unravel explains the concepts first (what Kafka is, how a consumer group shares partitions), then shows the flow of your code, at the detail level you pick.
Works with a file page, a raw link or a gist. Your browser fetches the file straight from GitHub; nothing goes through this site.
➕ Add context (optional): where it is called from, its class, its config
The more Unravel sees, the more it can say. A caller shows how arguments flow in and how the call site changes behaviour; the class adds fields and annotations; the config explains the values the code reads. None of it is uploaded unless you use the optional AI tab.
Why this exists
Reading unfamiliar code is the skill that makes a developer fast, and it is the skill that gets weaker when every question goes to a chatbot. Unravel is built for the moment where you want to understand a Kafka consumer, a Spring service or a concurrent job well enough to change it with confidence, not just to have someone else explain it once.
It works in the order an experienced engineer would explain it to you: first the ideas the code leans on (topics, partitions, consumer groups, offsets), each with a plain mental model and the mistakes people make; then the flow of your specific code as a diagram and a numbered walkthrough; then the things that can go wrong. Switch to Gist for a quick orientation, or to Under the hood when you want to know how the framework and the JVM actually do it.
What it covers today
- Kafka: topics and partitions, producers, the poll loop, consumer groups, offsets and commits, rebalancing, serializers, Spring Kafka listeners.
- Spring: beans and injection, how annotations work through proxies, REST controllers,
@Transactional,@Scheduled,@Async, events, configuration, Spring Data. - Persistence: JPA entities, lazy loading and the N+1 problem, JDBC and prepared statements.
- Java itself: lambdas, streams, Optional, collections, generics, records, switch expressions, enums,
java.time,BigDecimal. - Concurrency: threads,
synchronized, locks, atomics, executors,CompletableFuture, concurrent collections. - Around the code: exceptions, try-with-resources, logging, Jackson, HTTP clients, JUnit and Mockito.
Honest limits
Unravel knows what its concept library knows. It does not reason about arbitrary code the way a language model can, so for something outside the library it explains the structure (what is called, in what order, under which conditions) and tells you that the concept is not covered, instead of guessing. It does not see code you did not paste: a call to a method that is not in your snippet is shown as a call, with no claim about what happens inside.
Start with a concept
Frequently asked questions
Does Unravel use AI?
Not by default. The standard explanations are not generated by a language model. Unravel reads your code with a real Java parser (tree-sitter), detects the frameworks and constructs in it, and then writes the explanation from a hand-written concept library and templates. So the same code always gives the same explanation, and it never invents an answer. When it meets something it has no concept for, it says so. If the site owner has switched on the optional AI mode, an extra AI explain tab appears; it is off until you turn it on yourself, and the next question explains what it sends.
Is my code uploaded anywhere?
Not by default. Parsing and explaining run entirely in your browser, and the page works offline once loaded. The only thing that can leave your device is what you choose to copy, such as a share link. That link keeps the code after the # in the address, which browsers never send to a server. The one exception is optional AI mode (only available when the site owner has enabled it, and off until you turn it on): when you press Explain with AI, the code in the box, plus the names of the concepts, steps and risks Unravel found in it, is sent to an AI provider to write the explanation. BackendBench does not store it. You can turn AI mode off at any time, and the privacy page lists exactly what is sent.
How is this different from pasting code into ChatGPT?
A chatbot hands you a finished explanation. Unravel teaches the ideas first (what Kafka is, how a consumer group splits partitions), then shows the flow of your code, and lets you set how deep to go. It is built so you can read the next piece of code yourself, not only this one. The trade-off: it only knows what its library covers, while a language model can discuss anything.
What Java code does it understand?
Any Java syntax: classes, methods, lambdas, records, switch expressions, generics. You can paste a whole class, a single method or a few loose statements. For frameworks it currently covers Kafka (producers, consumers, groups, offsets, rebalancing, Spring Kafka), Spring (beans, controllers, @Transactional, @Scheduled, @Async, events, configuration), JPA and JDBC, streams and Optional, concurrency, exceptions, logging, Jackson, HTTP clients, JUnit and Mockito.
Can I use a photo or screenshot of code?
Not any more. Reading code from pictures was never reliable enough (a lowercase l or a 1, a missing brace and the explanation is wrong), so it was removed rather than left giving confident wrong answers. Three better ways in: paste the code, drop or open a .java file, or paste a GitHub link and Unravel fetches the file for you. If all you have is a screenshot, your phone or computer can copy the text out of it (iOS Live Text, Android Google Lens, Windows Snipping Tool text actions), and you can paste that.
Can I add the code that calls my method?
Yes. Open Add context and paste the caller, the surrounding class, or an application.yml. The Context tab then shows which argument goes into which parameter, how the call site changes behaviour (called in a loop, inside a transaction, on another thread, or from the same class so Spring annotations are skipped), and what your config sets for the values the code reads.
How can I test myself on my own code?
The Check yourself tab asks questions made from your code: what a line does, which method fits a blank, what is wrong at a line, and which mistakes belong to a concept. Each question has three hints. The Trace it tab runs plain-logic methods step by step with inputs you choose and shows every variable changing. You can also print a one-page study sheet or download flashcards for Anki, and mark concepts as learned (stored only in your browser).
What does Break it do?
It makes small, realistic changes to your code (removing a null check, emptying a catch, committing a Kafka offset before processing, dropping an unlock or a transaction) and explains what would go wrong, then shows what Unravel reports about the broken version. It is a way to learn what each line is for.
Can I compare two versions of my code?
Yes. Paste the newer version under Add context and open the Compare tab: it lists the problems the change fixes or introduces, concepts added or dropped, a step-by-step flow diff and the change in complexity.
What do the four detail levels mean?
Gist is a few lines about what the code does and why. Walkthrough adds the concepts in brief and the flow in plain words. Deep dive adds reasoning, common mistakes and what happens on failure. Under the hood explains how the framework and the JVM do it internally. You can switch levels at any time without pasting again.
What does the Watch out tab check?
About 30 common patterns: swallowed or only-logged exceptions, a Kafka listener that hides failures from the framework, @Transactional or @Async called from inside the same class, database calls inside loops, SQL built by joining text, unclosed resources, locks without finally, non-thread-safe shared state, money stored in double, and more. They are pattern checks, not proofs.