Menu
CoddyTech

Trinket alternative

A Trinket alternative for Python and Java

Trinket shut down on 31 August 2026, and every embedded trinket now shows a notice instead of code. Here is what Coddy replaces today, and what it doesn't.

Swap an old embed

Paste an old Trinket embed or link. If Coddy can replace it, the new embed appears below, ready to copy.

See it run

Real embeds, exactly as they appear on your page. Press Run in any of them.

Powered by Coddy

Make your embed

Theme
Layout
Live previewType your starter code and input right in the editor below.
Powered by Coddy
Copy this iframe
<figure style="margin:0;border:1px solid #e2e8f0;border-radius:8px;overflow:hidden"><iframe src="https://coddy.tech/embed-editor?lang=python&theme=light&code=bmFtZSA9IGlucHV0KCJXaGF0IGlzIHlvdXIgbmFtZT8gIikKYWdlID0gaW50KGlucHV0KCJIb3cgb2xkIGFyZSB5b3U_ICIpKQpwcmludChmIkhlbGxvLCB7bmFtZX0hIFlvdSBhcmUge2FnZX0geWVhcnMgb2xkLiIpCg&stdin=QWxpY2UKMzAK&credit=0" width="100%" height="480" style="display:block;border:0;width:100%" title="Python code editor by Coddy" loading="lazy"></iframe><figcaption style="box-sizing:border-box;padding:5px 12px;font:11px/1.4 system-ui,-apple-system,sans-serif;color:#64748b;background:#f1f5f9;border-top:1px solid #e2e8f0;text-align:right" dir="ltr">Powered by <a href="https://coddy.tech/embed" target="_blank" rel="noopener" style="color:#0077ff;font-weight:600;text-decoration:none;">Coddy</a></figcaption></figure>

Free to use on any site. Please keep the "Powered by Coddy" link so others can find the editor. That's all we ask.

What moves over

Python runs in the reader's browser, with a live console for input() and turtle drawings. Java and other languages run on Coddy's servers, matplotlib charts are drawn there too, and HTML and CSS preview live as you type. GlowScript, pygame and Blockly don't move over.

On TrinketOn Coddy
Python consoleYes Embeddable. Runs in the reader's browser, and input() waits for the reader's answer, as on Trinket.
JavaYes Embeddable.
R, and other text languagesYes Embeddable: R, SQL, C, C++, JavaScript, Go, Rust and more.
Python 3 with charts (matplotlib)Yes Embeddable. The chart is drawn on Coddy's server, with a short pause between runs.
HTML and CSSYes Embeddable, with a live preview as you type. JavaScript, including p5.js sketches, runs in it too.
Turtle graphicsYes Embeddable. Python's turtle draws in the reader's browser. Programs that wait for key presses or clicks don't run.
Courses and assignmentsPartly Coddy's own courses, assigned in a free classroom. You can't upload your own exercises.

For teachers

  • A free classroom for up to 35 students in one class.
  • See who is stuck while the class is coding.
  • Bugsy, Coddy's AI tutor, can help in full, give hints only, or stay off.
  • Assign chapters from Coddy's courses in Python, Java and more.

How to swap an embed

Paste the old embed

Copy the Trinket iframe from your page and paste it above. We read its language and height.

Add your code

Paste your program into the editor, with any input it needs.

Replace the iframe

Copy the new snippet and put it where the Trinket iframe was.

Questions

Is it free?

Yes. The embed is free on any site, and so is a classroom of up to 35 students. We only ask that you keep the small "Powered by Coddy" line under the editor.

Can I import my trinkets?

No. Trinket's content went offline with the site, and we have no access to it. If you kept a copy of your code, paste it into the editor.

Does Coddy run turtle?

Yes. Python runs in the reader's browser, and turtle draws on the page as it did on Trinket. Programs that react to key presses or clicks don't run, and pygame and GlowScript don't work.

What about GlowScript, pygame, Sense HAT or Blockly?

Coddy doesn't run them. GlowScript has its own free home at glowscript.org, and Raspberry Pi's Code Editor covers Sense HAT projects.

Does input() work?

Yes. Python runs in the reader's browser, so input() waits for the reader to type an answer in the console, as on Trinket.

Do readers need an account?

No. Anyone can edit and run the code in the embed without signing up.

Does the embed save students' work?

No. The embed is for examples on your page, and nothing typed into it is kept. Students who want to keep their code can sign up and save it in Coddy projects.

How is browser Python different from Trinket's?

It is Python 3.14 with the standard library, turtle included. Packages like numpy are not installed (the matplotlib embed draws charts), programs can't reach the network, and files they write are not kept. If Python can't start in a browser, the embed runs the code on Coddy's server instead.

Which languages can be embedded?

Python, Java, R, SQL, C, C++, C#, JavaScript, TypeScript, Go, Rust, Ruby, PHP, Kotlin, Swift, Dart, Lua and more, plus HTML and CSS with a live preview and Python charts with matplotlib.