Free · Runs in your browser

See Inside Your Computer While Code Runs

CodeX-Ray is an interactive C programming visualizer. Step through your code line by line and watch the CPU and RAM react live, with every step explained in English and Roman Urdu.

No installs. No sign-up needed to try it.

main.cStep 2 / 3
1int a = 5;
2int b = a + 3;
3printf("%d", b);
CPU
Control Unit
fetch
ALU
5 + 3 = 8
RAM
a · 4B5
b · 4B8
0x1000 · 0x1004

ENThe CPU adds 5 + 3 and stores 8 in b.

URCPU 5 + 3 jama karke 8 ko b mein rakhta hai.

What's inside

Everything you need to teach and learn C

Eight live features, all available in the Studio today.

Live 2D CPU & RAM X-Ray

Watch Fetch → Decode → Execute → Writeback, ALU calculations, Address/Data Buses, and RAM memory boxes update step by step.

  • CPU
  • ALU
  • Buses
  • RAM

English & Roman Urdu Narrator

Every C statement is explained clearly in plain English or Roman Urdu, backed by a Dry-Run Table and built-in Ask AI help.

  • English
  • Roman Urdu
  • Dry-Run Table
  • Ask AI

Google Classroom-Style Classes

Teachers create classes with unique CXR-XXXX join codes, track isolated student progress, and export CSV reports.

  • CXR-XXXX codes
  • Progress
  • CSV export

Custom Class Lessons & Curriculum Control

Teachers publish custom C lessons with exam notes, and customize or hide built-in topics for each class.

  • Custom lessons
  • Exam notes
  • Show / hide topics

Class Programs & Cloud Save

Teachers save live class demos and tasks to the cloud with Save to Class. Students load them in one click.

  • Save to Class
  • Class Programs
  • 1-click load

Verified Task Submissions

Students must run their code without errors before they can submit. Teachers inspect each student's code and output in one click.

  • Submit Task
  • Clean-run check
  • Load Code

Real GCC Fallback

File handling (fopen) and full compiler errors automatically run on real GCC, with the exact output shown in the Terminal.

  • fopen
  • Compiler errors
  • Exact output

Refresh-Proof Autosave

Your code saves in the browser as you type, so an accidental refresh never loses your work.

  • Autosave
  • Browser storage

30-second guide

How it works

Three steps from "what is this?" to "oh, now I get it."

1

Pick a lesson or write C code

Choose a ready-made example from the topic list, or type your own C program in the editor.

2

Press Step (→) and watch

Each press runs one line. See the 2D Computer, the RAM Boxes with addresses and byte sizes, and the Dry-Run Trace Table update live.

Tip: use the → key on your keyboard.

3

Track progress or teach live

Students tick lessons as done. Teachers draw on screen, focus the class and follow every student's progress.

Quick guide

How to Use CodeX-Ray

Learn at your own pace, or run a whole class from the front of the room.

For Students

Start in 3 steps

  1. Open the Studio
    Go to /studio. No sign-up is needed to start practicing.
  2. Pick a topic or type your own C code
    Then hit Step to watch the CPU and RAM react live, one line at a time.
  3. Join your teacher's class
    Sign up as a Student and enter your teacher's CXR-XXXX code to unlock class lessons and track your progress.
Open the Studio
For Teachers

Set up your class in 3 steps

  1. Create your first class
    Sign up as a Teacher and create a class to get an instant CXR-XXXX join code.
  2. Share the code and monitor
    Give the code to your students, then monitor completion from the Students dashboard.
  3. Publish your own lessons
    Open Class Lessons to publish custom C programs and exam tips, or customize built-in topics for your batch.
Open the Studio

A to Z guide

Never feel lost: step-by-step for your role

Pick Student or Teacher and follow the steps in order. No experience needed.

  1. Step 1: Sign Up & Join Class

    Create an account and enter your teacher's Join Code (like CXR-XXXX) to unlock your class.

  2. Step 2: Pick a Topic or Class Program

    Use the top dropdown for syllabus topics and Lesson Notes, or click Class Programs to load live demos and tasks shared by your teacher.

  3. Step 3: Step vs. Run All

    Click Step to watch every line run inside the CPU and RAM (2D Computer, RAM Boxes, Dry-Run Table), or Run all to see the final output in the Terminal.

  4. Step 4: Switch Language (EN / Roman Urdu)

    Toggle the X-Ray explanation language anytime if another language makes a step easier to follow.

  5. Step 5: Solve & Submit Tasks

    Edit the loaded task and click Run all to check for zero errors. Then click Submit Task. It unlocks only after a clean run, and a green ✓ Submitted badge confirms it was sent.

  6. Step 6: Auto-Save Peace of Mind

    Your edits are saved in your browser automatically. Refreshing the page won't erase your code.

Don't panic

Quick answers

The questions people ask most.

Why did it switch to Real GCC Mode?

Some programs need more than the built-in interpreter can do, like file handling (fopen) or code with syntax errors. CodeX-Ray then runs your program on real GCC and shows the exact compiler or program output in the Terminal.

Why is my Submit Task button disabled?

You need to run your code cleanly first. Click Run all and make sure there are no errors. If you edit the code afterwards, run it once more to unlock the button again.

Will I lose my code if I refresh?

No. Your active code is autosaved in your browser, so a refresh or an accidental tab close keeps your work.

I can't see my teacher's Class Programs

Make sure you're signed in and have joined your class with the Join Code from your teacher. Then open Class Programs and press the refresh button.

Where is the Save to Class button?

Save to Class is for teacher accounts only. Students open programs from Class Programs and send their work with Submit Task.

Meet the creator

Built by a teacher, for students

Tahir Ali

Tahir Ali

Computer Systems Engineer & CS Educator

Teaching programming fundamentals since 2024, I noticed most beginners struggle with C not because the syntax is hard, but because they cannot see what happens inside memory. I built CodeX-Ray to bridge the gap between abstract code and the real CPU, ALU, and RAM running underneath.

Ready to see your code think?

Open the Studio, pick a topic and press Step. It takes about thirty seconds to get the idea.

Public Beta

CodeX-Ray is in Public Beta — Help Me Improve It

Students, teachers and developers: report bugs, suggest C topics (like Pointers or Arrays), or share how CodeX-Ray worked in your classroom. Every message is read.

Or write to tahirali4051@gmail.com