A simple and efficient command-line tool for cleaning and normalizing text files.
- ✅ Remove Extra Spaces - Normalize multiple spaces into single spaces
- ✅ Remove Empty Lines - Strip out blank lines from your text
- ✅ Normalize UTF-8 - Ensure all text is valid UTF-8 encoding
- ✅ Strip Punctuation - Optional removal of all punctuation characters
# Clone the repository
git clone https://github.com/yourusername/textcleaner.git
cd textcleaner
# Build
go build -o textcleaner main.go# Remove extra spaces and normalize UTF-8
textcleaner --input messy.txt --output clean.txt
# Remove empty lines
textcleaner --input input.txt --output output.txt --no-empty
# Strip punctuation
textcleaner --input input.txt --output output.txt --strip-punct
# Combine options
textcleaner --input messy.txt --output clean.txt --strip-punct --no-empty--input- Input file path--output- Output file path
--strip-punct- Remove all punctuation--no-empty- Remove empty lines
Upgrade to Text Cleaner Pro for advanced features:
🔥 Advanced Cleaning
- Case conversion (lowercase, uppercase, title case)
- Remove duplicate lines
- Line length limiting
- Custom character removal
📦 Batch Processing
- Process multiple files at once
- Recursive directory scanning
- Progress bars for large operations
📊 Statistics & Reporting
- Detailed cleaning statistics
- JSON output format
- Before/after comparison
⚡ Performance
- Optimized for large files
- Streaming support
- Fast batch operations
👉 Get Text Cleaner Pro on Gumroad 👈
One-time purchase • Lifetime updates • Priority support
Input:
Hello world! This is a test.
Multiple spaces everywhere.
Output:
Hello world! This is a test.
Multiple spaces everywhere.
Input:
First line
Second line
Third line
Output:
First line
Second line
Third line
GOOS=windows GOARCH=amd64 go build -o textcleaner.exe main.goGOOS=linux GOARCH=amd64 go build -o textcleaner main.goGOOS=darwin GOARCH=amd64 go build -o textcleaner main.goContributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
If you find this tool helpful, please consider:
- ⭐ Starring the repository
- 🐛 Reporting bugs
- 💡 Suggesting new features
- 💎 Upgrading to Pro
- Issues: GitHub Issues
- Pro Support: support@textcleaner.com
Free Version | Get Pro Version →