Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

4 Commits

Repository files navigation

📸 CodeSnap — Beautiful Code Screenshots

GitHub starsLicense: MITHTML5CSS3JavaScript

Create stunning screenshots of your code in seconds. Free, open-source alternative to Carbon.

No sign-up. No backend. No build step. Just open and go.

CodeSnap Preview


✨ Features

  • 🎨 8 beautiful themes — Dracula, Monokai, GitHub Dark, One Dark, Nord, Solarized, Night Owl, Tokyo Night
  • 🌐 15 languages — JavaScript, Python, TypeScript, HTML, CSS, Java, C++, Go, Rust, PHP, Ruby, SQL, Bash, JSON, YAML
  • 🌈 Gradient backgrounds — Sunset, Ocean, Forest, Midnight, Candy, or pick a custom color
  • 📐 Customizable padding — 16px, 32px, or 64px
  • 🔢 Line numbers — Toggle on or off
  • 🖥️ macOS window controls — Classic red/yellow/green dots or none
  • 🔤 Adjustable font size — 12px to 20px
  • 📏 Border radius control — From sharp to rounded corners
  • 📸 Export as PNG — High-resolution 2x export via html2canvas
  • 📋 Copy to clipboard — One-click copy as image
  • Zero dependencies — Pure HTML/CSS/JS with CDN libraries
  • 🚀 No build step — Just open index.html

🚀 How to Use

  1. Paste your code into the editor
  2. Customize the theme, language, background, padding, and more
  3. Export as PNG or copy to clipboard

That's it!


🎨 Available Themes

ThemeStyle
DraculaDark purple tones
MonokaiClassic dark with vibrant colors
GitHub DarkGitHub's dark mode
One DarkAtom's iconic dark theme
NordArctic, north-bluish palette
SolarizedEthan Schoonover's dark variant
Night OwlDesigned for night owls
Tokyo NightA Tokyo-inspired dark theme

🏠 Self-Hosting

CodeSnap is a static site — no server required.

# Clone the repo
git clone https://github.com/Senzo13/codesnap.git
# Open itcd codesnap
open index.html # macOS
start index.html # Windows
xdg-open index.html # Linux

Or simply deploy the folder to any static hosting provider:

  • GitHub Pages — Push and enable Pages in repo settings
  • Netlify — Drag and drop the folder
  • Vercel — Import the repo

📁 Project Structure

codesnap/
├── index.html # Main HTML page
├── css/
│ ├── style.css # Core styles & layout
│ └── themes.css # Code editor theme colors
├── js/
│ ├── app.js # Main application logic
│ └── export.js # PNG export & clipboard
└── README.md

🤝 Contributing

Contributions are welcome! Here's how:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License. See the LICENSE file for details.


🙏 Credits

About

Create beautiful screenshots of your code. Choose themes, languages, and export as PNG. Free, open-source Carbon alternative.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages