A fast, lightweight, and intuitive web application for converting text between different case formats. Perfect for developers who need quick case transformations without leaving their browser.
- camelCase -
firstName - PascalCase -
FirstName - snake_case -
first_name - kebab-case -
first-name - SCREAMING_SNAKE_CASE -
FIRST_NAME - lowercase -
firstname - UPPERCASE -
FIRSTNAME - Title Case -
First Name - Sentence case -
First name
- β‘ Real-time conversion as you type
- π One-click copy to clipboard
- π± Fully responsive design (mobile, tablet, desktop)
- βΏ Accessibility compliant (ARIA labels, keyboard navigation)
- π¨ Clean, modern interface with smooth animations
- π Character and word count display
- π§Ή Smart input sanitization and word detection
- πββοΈ Zero dependencies - Pure vanilla JavaScript
- β‘ Lightweight - < 15KB total size
- π§ Modular architecture with pure functions
- π Performance optimized with debounced updates
- π Cross-browser compatible with fallbacks
- π― Edge case handling for mixed input formats
Visit the live demo: Text Case Converter
# Clone the repository
git clone https://github.com/0x-Decrypt/case-converter.git
# Navigate to the project directory
cd case-converter
# Open in your browser
open index.html
# or serve with a simple HTTP server
python -m http.server 8000
# Then visit http://localhost:8000<!-- Include in your project -->
<script src="https://cdn.jsdelivr.net/gh/0x-Decrypt/case-converter@main/script.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/0x-Decrypt/case-converter@main/styles.css">- Type or paste your text in the input area
- View real-time conversions in all supported formats
- Click copy buttons to copy any result to clipboard
- Use the clear button to reset everything
The converter intelligently handles mixed input formats:
// Input: "firstName lastName"
camelCase β firstName
PascalCase β FirstNameLastName
snake_case β first_name_last_name
kebab-case β first-name-last-name
// Input: "user_profile_data"
camelCase β userProfileData
PascalCase β UserProfileData
Title Case β User Profile DataCtrl/Cmd + K- Focus input fieldCtrl/Cmd + A- Select all text in focused field
Share specific text conversions:
https://your-site.com/case-converter?text=hello%20world
case-converter/
βββ index.html # Semantic HTML structure
βββ styles.css # Mobile-first responsive CSS
βββ script.js # Vanilla JavaScript application
βββ README.md # Project documentation
βββ tests/ # Test files (future expansion)
// Pure utility functions
const utils = {
splitWords(text), // Smart word boundary detection
sanitizeInput(text), // Input cleaning
debounce(func, wait) // Performance optimization
}
// Case conversion functions (pure functions)
const converters = {
toCamelCase(text),
toPascalCase(text),
toSnakeCase(text),
// ... all 9 converters
}
// UI controller for DOM manipulation
const ui = {
init(), // Initialize application
updateOutputs(text), // Update all conversions
copyToClipboard() // Handle copy functionality
}- All 9 case conversions work correctly
- Real-time updates without lag
- Copy functionality works in all browsers
- Responsive design on mobile/tablet/desktop
- Accessibility with keyboard navigation
- Edge cases (empty input, special characters, numbers)
| Browser | Version | Status |
|---|---|---|
| Chrome | 60+ | β Full support |
| Firefox | 55+ | β Full support |
| Safari | 12+ | β Full support |
| Edge | 79+ | β Full support |
- Initial Load: < 50ms
- Conversion Speed: < 5ms for 10,000 characters
- Memory Usage: < 2MB
- Bundle Size:
- HTML: ~3KB (gzipped)
- CSS: ~4KB (gzipped)
- JS: ~7KB (gzipped)
- β WCAG 2.1 AA compliant
- β Screen reader compatible
- β Keyboard navigation support
- β High contrast mode support
- β Focus management and ARIA labels
- β Reduced motion support
We welcome contributions! Here's how to get started:
# Fork and clone the repository
git clone https://github.com/0x-Decrypt/case-converter.git
cd case-converter
# Create a feature branch
git checkout -b feature/amazing-feature
# Make your changes and test thoroughly
# Commit with clear messages
git commit -m "Add amazing feature"
# Push and create a pull request
git push origin feature/amazing-feature- Follow the existing code style and patterns
- Keep functions under 25 lines when possible
- Add comments explaining "why" not "what"
- Test across different browsers and devices
- Update documentation for new features
- Add more case formats (Train-Case, flatcase, etc.)
- Implement batch processing for multiple texts
- Add file upload/download functionality
- Create API endpoints for programmatic access
- Add custom transformation rules
- Implement dark/light theme toggle
- Add more keyboard shortcuts
- Create browser extension version
This project is licensed under the MIT License - see the LICENSE file for details.
- Font families: System fonts for optimal performance
- Icons: Unicode characters for universal compatibility
- Inspiration: Developer tools that prioritize simplicity and speed
Built with β€οΈ for the developer community