DataValidator
Overview
DataValidator is a high-performance, privacy-first validator for JSON, YAML, XML, and TOML. Built with Go, it processes all data locally with zero logging, zero tracking, and zero data retention. Your data never leaves your machine.
π Quick Start
# Install
go install github.com/akhilesharora/datavalidator/cmd/datavalidator@latest
# Validate a file
datavalidator validate config.json
# Start web interface
datavalidator web
π Try it online: https://freedatavalidator.xyz
Features
- π 100% Private - No data ever leaves your machine
- β‘ Lightning Fast - Built in Go for maximum performance
- π― Multi-Format - JSON, YAML, XML, and TOML support
- π Auto-Detection - Automatically identifies data formats
- π¦ Zero Dependencies - No external runtime dependencies
- π Cross-Platform - Works on Linux, macOS, and Windows
- π οΈ Dual Mode - Use as CLI tool or Go library
- π Web Interface - Built-in web UI for browser-based validation
Installation
Using Go
# As a CLI tool
go install github.com/akhilesharora/datavalidator/cmd/datavalidator@latest
# As a library
go get github.com/akhilesharora/datavalidator/pkg/validator
Pre-built Binaries
Download the latest binary for your platform from the releases page.
From Source
Linux/macOS
git clone https://github.com/akhilesharora/datavalidator
cd datavalidator
make build
Windows
git clone https://github.com/akhilesharora/datavalidator
cd datavalidator
go build -o datavalidator.exe ./cmd/datavalidator
Development Setup
For contributors, set up pre-commit hooks to ensure code quality:
# Install pre-commit hooks
make pre-commit
# Or manually
./scripts/setup-hooks.sh
This will install hooks that:
- Format code automatically
- Run tests before push
- Check for linting issues
- Prevent commits with formatting errors
Usage
Command Line Interface
# Validate a single file
datavalidator validate config.json
# Validate multiple files
datavalidator validate config.json data.yaml settings.toml
# Validate all files in a directory
datavalidator validate ./configs/
# Pipe data through stdin
echo '{"name": "test"}' | datavalidator validate
# Specify format explicitly
datavalidator validate --format json config.txt
# Output as JSON for CI/CD pipelines
datavalidator validate --json config.json
# Start web interface
datavalidator web --port 8080
# Windows examples
datavalidator.exe validate config.json
type config.json | datavalidator.exe validate
Go Library
package main
import (
"fmt"
"log"
"github.com/akhilesharora/datavalidator/pkg/validator"
)
func main() {
// Auto-detect format
data := []byte(`{"name": "John", "age": 30}`)
result := validator.ValidateAuto(data)
if result.Valid {
fmt.Printf("Valid %s data\n", result.Format)
} else {
log.Fatalf("Invalid data: %s", result.Error)
}
// Validate specific format
v, _ := validator.NewValidator(validator.FormatJSON)
result = v.ValidateString(`{"test": true}`)
fmt.Printf("Valid: %v\n", result.Valid)
}
Web Interface
Start the built-in web server:
datavalidator web
# Server starts at http://localhost:8080
The web interface provides:
- Real-time validation as you type
- Format auto-detection
- Syntax error highlighting
- One-click formatting
- 100% client-side processing
| Format |
Extensions |
Auto-Detection |
Description |
| JSON |
.json |
β
|
JavaScript Object Notation |
| YAML |
.yaml, .yml |
β
|
YAML Ain't Markup Language |
| XML |
.xml |
β
|
Extensible Markup Language |
| TOML |
.toml |
β
|
Tom's Obvious, Minimal Language |
Privacy & Security
DataValidator is designed with privacy as the core principle:
- No Network Calls - The tool works completely offline
- No Data Storage - No temporary files, logs, or caches
- No Tracking - Zero analytics, telemetry, or usage tracking
- Memory Only - Data is processed in memory and immediately discarded
- Open Source - Full source code available for security audits
DataValidator is optimized for speed:
- Written in Go for native performance
- Zero-allocation design for common operations
- Streaming support for large files
- Minimal memory footprint
- No external dependencies
Use Cases
- CI/CD Pipelines - Validate configs before deployment
- Development - Quick validation during development
- Data Processing - Pre-validate input files
- API Testing - Validate API responses
- Configuration Management - Ensure configs are well-formed
Contributing
We welcome contributions! Please see our Contributing Guidelines.
Development Setup
# Clone the repository
git clone https://github.com/akhilesharora/datavalidator
cd datavalidator
# Install dependencies
go mod download
# Run tests
make test
# Run linter
make lint
# Build binary
make build
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
Built with β€οΈ by Akhilesh Arora and contributors.
β¬ back to top
If you find this project useful, please consider giving it a β