The modern, blazing-fast native Linux developer lens for inspecting, visualizing, converting, and diffing structured data.
Modern backend and full-stack developers constantly deal with diverse structured formats: API JSON responses, legacy XML payloads, PHP debugging dumps (var_dump(), print_r(), var_export()), and complex file differences.
Web-based formatters compromise sensitive credentials and struggle with multi-megabyte payloads. Heavy IDEs are slow to open.
VarLens is engineered specifically for Linux developers as a zero-compromise, native desktop application. Built with Rust, GTK4, and Libadwaita, it launches instantly, operates completely offline, runs heavy operations asynchronously, and adheres to GNOME's modern design standards.
| Interactive Tree Explorer | JSON Inspector & Live AST Metrics |
|---|---|
![]() |
![]() |
PHP var_dump() & print_r() Parser |
XML Inspector & W3C Validation |
|---|---|
![]() |
![]() |
- Dual View Modes: Seamlessly toggle between an editable source view with custom code folding (
GtkSourceView 5) and an Interactive Tree Explorer. - Semantic Type Badges in Tree View: Styled visual pills for objects (
{}with key count), arrays ([]with item count), strings (STR), links (URL), numbers (NUM), booleans (BOOL), andNULL. - Collapsible Hierarchies & Gutter Folding: Deep node unfolding in Tree View and non-destructive block folding in the code editor with active-line bold numbers and folded-block highlight bars.
- Interactive Code Minimap (
GtkSourceMap): Smooth 1:1 slider dragging and click-to-jump navigation across large payloads. - Live Code & Tree Search: Instant search inside the code editor (
Ctrl+F) with match highlighting, plus case-insensitive key/value search in the Tree View with match navigation (1/N) and auto-expansion. - Instant Path & Value Copying: Click any node in the Tree View to copy its programmatic access path (e.g.,
data.users[0]["api.key"]) or copy its raw value / formatted sub-JSON directly to your clipboard. - Recursive Key Sorting (
AβZ): Sort all JSON object keys alphabetically at every nesting level (Ctrl+Shift+S). - XML to JSON Conversion: Convert XML payloads (including
@attributes,#text, andCDATAblocks) into structured JSON for inspection in the Interactive Tree Explorer. - RFC 8259 & W3C Validation: Live AST syntax validation badges, key counts, tree depth, and payload metrics.
- Flexible Formatting: Format with 2 spaces, 4 spaces, or tabs, or compact into a single line (Minify).
- Formal PEG Grammar: Powered by a robust
pestPEG parser that faithfully deserializes PHP dump outputs into valid JSON. - Handles PHP Complexity: Supports typed primitives (
bool,int,float,string(N)), references (&), visibility modifiers (public,protected,private), sequential arrays, associative arrays, objects, and nested recursion flags (*RECURSION*). - Raw Array &
var_export()Support: Dedicated auto-detection and parsing for PHPprint_r()(Array (...),stdClass Object), traditionalvar_export()(array('k' => 'v'),ClassName::__set_state(...)), and short array syntax (['k' => 'v']). - One-Click Conversion: Transform raw PHP dumps into formatted JSON (
Ctrl+Shift+J) or explore them directly in the Interactive Tree View.
- Synchronized Dual View: Coordinated vertical scrolling and synchronized cursor tracking between base and modified editors with distinct red/green panel header accents.
- Granular Change Detection: Visualizes line additions (green) and deletions (red) with 3.5px vertical gutter stripes and inline word/character-level highlight spans.
- Live Similarity Metric: Real-time similarity percentage badge (
% similarity) alongside addition/deletion counters. - Diff Workflow Power Tools:
- Swap Panels (
β): Swap Original (Left) and Modified (Right) contents in a single click. - Normalize Before Diff: Auto-format and canonicalize both panels (JSON, XML, or PHP dumps) before comparing.
- Export Unified Diff (
.patch): Copy standard Unified Diff patch output directly to your clipboard.
- Swap Panels (
- Myers & Patience Algorithms: Toggle between the standard Myers algorithm and the Patience algorithm in Preferences for clean, semantic structural diffs.
- Whitespace Agnostic: Ignore whitespace differences with a single switch.
- Diff Chunk Navigation: Jump quickly between changes with
Ctrl+[andCtrl+].
- Instant Light / Dark Theme Toggle: Switch between custom
varlens-darkandvarlens-lightthemes directly from the HeaderBar with full synchronization across Libadwaita, GtkSourceView, and the Tree Explorer. - One-Click Demo Loader: Load rich, realistic sample payloads tailored to the active tool (
Diff,JSON,XML,var_dump, orprint_r). - Drag & Drop + File Save: Drag files directly into the window to inspect or compare, and save formatted outputs to disk (
Ctrl+S). - True Non-Blocking Concurrency: Payloads exceeding threshold limits are automatically offloaded to background worker threads (
std::thread), keeping the UI fluid at 60 FPS. - Native Internationalization (i18n): Real-time English and Spanish interface switching in Preferences without application restarts.
| Shortcut | Action | Scope |
|---|---|---|
| Ctrl + O | Open File | Global |
| Ctrl + S | Save Formatted Output to File | Global |
| Ctrl + F | Focus Live Code Search | Inspector |
| Ctrl + Shift + F | Format / Prettify Content | Inspector |
| Ctrl + Shift + M | Minify Content | Inspector |
| Ctrl + Shift + S | Sort JSON Keys Alphabetically (AβZ) |
Inspector |
| Ctrl + Shift + J | Convert var_dump / print_r / XML to JSON |
Inspector |
| Ctrl + Enter | Recalculate Differences | Diff Viewer |
| Ctrl + [ | Jump to Previous Difference | Diff Viewer |
| Ctrl + ] | Jump to Next Difference | Diff Viewer |
| Ctrl + Shift + C / D | Clear All Diff Inputs | Diff Viewer |
| F1 / Ctrl + ? | View Shortcuts Dialog | Global |
- Core Language: Rust 2021 Edition
- UI Toolkit: GTK 4.12+ via
gtk4-rs - Human Interface Guidelines: Libadwaita 1.5+
- Source Editor: GtkSourceView 5 with custom light and dark color schemes
- Diff Engine:
similarwith Myers & Patience algorithms and inline span computation - Parser Engine:
pestPEG grammar parser +roxmltree - Serialization:
serde_jsonwith key order preservation (preserve_order)
VarLens is available on Flathub for all major Linux distributions:
# Install from Flathub
flatpak install flathub io.github.PinedaMB.VarLens
# Run VarLens
flatpak run io.github.PinedaMB.VarLensEnsure you have Rust and the required GTK4 / Libadwaita development libraries installed:
sudo dnf install -y rust cargo gtk4-devel libadwaita-devel gtksourceview5-develsudo apt install -y cargo rustc pkg-config libgtk-4-dev libadwaita-1-dev libgtksourceview-5-devsudo pacman -S rust gtk4 libadwaita gtksourceview5# Clone the repository
git clone https://github.com/PinedaMB/VarLens.git
cd VarLens
# Run unit test suite
cargo test
# Build and execute in development mode
cargo run
# Build an optimized production release binary
cargo build --releaseThe optimized release executable will be available at ./target/release/varlens.
To install VarLens locally for your user account:
# Copy binary
install -Dm755 target/release/varlens ~/.local/bin/varlens
# Install application icon
install -Dm644 data/icons/hicolor/scalable/apps/io.github.PinedaMB.VarLens.svg \
~/.local/share/icons/hicolor/scalable/apps/io.github.PinedaMB.VarLens.svg
# Install desktop entry and AppStream metadata
install -Dm644 data/io.github.PinedaMB.VarLens.desktop ~/.local/share/applications/io.github.PinedaMB.VarLens.desktop
install -Dm644 data/io.github.PinedaMB.VarLens.metainfo.xml ~/.local/share/metainfo/io.github.PinedaMB.VarLens.metainfo.xml
# Refresh icon cache and desktop database
gtk4-update-icon-cache -f -t ~/.local/share/icons/hicolor
update-desktop-database ~/.local/share/applicationsDownload VarLens-windows-x86_64.zip from Releases, extract the ZIP archive, and run varlens.exe. No installation or runtime dependencies required.
Planned upcoming featuresβincluding PHP serialize() support, inline smart decoding (escaped JSON, JWT, Base64), live JSONPath/XPath querying, semantic Tree Diff, type/struct code generation, and CLI/stdin pipe supportβare documented in detail in ROADMAP.md.
Contributions, bug reports, and suggestions are welcome! Feel free to open an issue or submit a pull request on GitHub.
VarLens is 100% free and open-source software built with dedication. If VarLens saves you time, simplifies your debugging, or enhances your daily development workflow, consider supporting its ongoing maintenance and new features:
- Buy Me a Coffee β Buy a coffee to support development.
- Star the Repository β A star on GitHub helps other Linux developers discover VarLens!
VarLens is distributed under the open-source MIT License.



