Code smarter.
Ship with CodeCodex.
Find ready-made code in 40+ languages. Copy what you need, change it if you want, and share your fix back with everyone else.
A code library that keeps getting better
Most code libraries stay the same forever. CodeCodex is different — it’s a wiki, so anyone can fix a bug or add a better version. The result is a page that improves every day, not just on launch day.
Find code you can use right away
Browse 500+ algorithms, helper functions, and small utilities across 40+ languages.
Edit anything you find
See a bug or have a faster way to write it? Just edit the page — everyone gets the update.
Checked by other developers
Like Wikipedia, but for code. More eyes on a page means fewer mistakes left in it.
40+ programming languages
Python, Java, C++, PHP, Ruby, Go, Haskell, SQL, Rust, and many more.
Code tutorials & examples
Add text to the end of a file without losing what’s already there
A safe way to append content to files in Python, Java, C++ and more, without breaking the existing data.
Calculate the number of days between two dates
A simple guide covering Python’s datetime, Java’s ChronoUnit, JavaScript, and a few other languages.
Find the number of minutes in a HH:MM:SS time string
Small, reusable functions to read and convert time strings, written in a few different languages.
Format a date for inserting into a MySQL database
The correct date format for MySQL inserts, with working examples in PHP, Python, Java, and Ruby.
Find code by topic
Every category is checked and updated by the community. Click one to start looking.
Input / Output
Reading and writing files, console input, and other examples of moving data in and out of a program.
I/OMath & Algorithms
Arithmetic, geometry, number theory, statistics, and the classic algorithm problems.
MathSort Algorithms
Bubble, merge, quick, heap sort, and more, written in every major language.
SortingTime & Dates
Formatting dates, working with time zones, and converting between time formats.
TimeGetting started takes seconds
CodeCodex is built so any developer, beginner or expert, can find, use, and add code right away.
Search the Codex
Use category tags or the search bar to find an algorithm or utility someone has already written.
Copy and use it
All code is free to use. Copy what you need into your project — no credit required.
Improve it
Found a bug or a faster way to write it? Edit the page directly so the next person benefits too.
Ask for what’s missing
Can’t find your use case? Request it, and someone in the community can write it for you.
Developers who saved time with CodeCodex
Real feedback from real contributors — from solo developers to engineering teams.
Real developers, adding code every day
CodeCodex grows because people keep sharing what they know, fixing small bugs, and making old pages better.
Stay in the loop
Get an email when new code, tutorials, and community updates land on the Codex.
