40 Sites to find, share & test code snippets online
When you are working on a project, often you come across the need for a block of code that performs a certain function, or display a certain layout.
Some 10 years ago the choices were limited for developers to find such code. The developer had to either create the block himself or post in a community forum in the hope that someone will help him out, or search big code repositories like sourceforge, GitHub etc. That was tiresome.
Now we have websites created specially for the purpose of writing, testing and sharing code. Most such sites are free to use, but some operate a freemium model where basic options are free but paid upgrades give you more options to manage your code.
The Sharing option can be private or public depending on the access level, or the package that you buy (if it is a paid code sharing website).
Code sharing and hosting sites are of the following types
- Simple text editors where you can write any type of code. You can save and share the code with a link. Typically there is no option to test the code.
- CSS code testing and sharing websites. These sites offer online editors to write and test CSS code live. You also get links to share your CSS code snippets.
- Websites where you can write and test programming languages like PHP, Java, C, C++ etc.
Simple Online Code Editors
Simple online code editors where you can write any type of code. You can save and share the code with a link. Typically there is no option to test code live. Most of these sites are actually simple text editors with fancy options.
- Control C
- Code Share
- Online Html Editor
- Friend Paste
- Edit Pad
- New Text Document
- Fire Pad
- Collab Edit
- Just Paste
- Write URL
- Gist Github
- Code Pile
- Private Bin
- Meeting Words
- Live Weave
- CSS Deck
- Stack Blitz – create and deploy fullstack apps.
- Codeply – allows code testing of multiple frameworks like Angular, Vue, React, Bootstrap and more.
- Livegap Editor
Test and share code written in programming languages
There are websites where you can write and test full programming languages like PHP, Java, C, C++ etc.
- Ideone – write, compile, test and share code online.
- Sql Fiddle – SQL code testing platform. Create schema and run queries online – all inside the browser.
- Code Chef Ide – write, compile, test and share code snippet in programming languages like C, C++, Java, RUBY, PHP, Perl and more.
- 3vrl editor – online PHP editor to write, test and share PHP code. multiple PHP versions.
- Online PHP Functions Sandbox – online PHP editor. Multiple PHP versions.
- Dot Net Fiddle – supported languages C#, VB.NET, F#
- Rex Tester – compile and share C# online.
- Sqlite Online – test and share SQL queries.