Visual filter & sort
Point-and-click filters and drag-to-reorder multi-column sorting. Save any combination as a named view.
Filter, sort, edit, insert, import and export your tables by point-and-click. pglens shows you the exact SQL behind every move. It's free, open source, and runs entirely on your machine.
Star on GitHubEverything you'd open a SQL client for, without typing a query
An auto-drawn map of every table and how they connect. Hover to spotlight relationships, filter live, and export the whole picture. New in 3.5: the map is editable: drag a handle to add a foreign key, add or retype columns, and pglens turns your edits into reviewable DDL behind the Run button.
Build a filter from a column, an operator, and a value. There's no WHERE clause to
remember. Stack multiple sorts by dragging them into the order you want, then save the whole
setup as a named view you can jump back to anytime.
LIKE, IN, IS NULL,
JSON & array| id | customer | status | total |
|---|---|---|---|
| 4821 | Mara Lindqvist | $412.00 | |
| 4820 | Dev Patel | $129.50 | |
| 4817 | Sofia Reyes | $340.00 | |
| 4815 | Jonah Brandt | $118.75 | |
| 4811 | Amara Okafor | $267.20 | |
| 4808 | Felix Tan | $155.00 |
Double-click a cell to change it. pglens picks the right control for the column (a toggle for booleans, a date picker, a validated JSON editor), so you can't write a bad value. Adding a row is a guided form built from your schema.
| id | customer | status | total |
|---|---|---|---|
| 4821 | Mara Lindqvist | $412.00 | |
| 4820 | Dev Patel | $129.50 | |
| 4815 | Jonah Brandt |
|
$118.75 |
| 4811 | Amara Okafor | $267.20 | |
| 4808 | Felix Tan | $155.00 |
Click any foreign-key value to slide in the row it points to, right beside the grid. Keep clicking to walk the relationships, with breadcrumbs back, or jump to every row that references it.
Every no-code action has a Show SQL button, so you see exactly what runs. Want to take over? Flip any tab to Advanced Mode: a schema-aware Monaco editor seeded with the query no-code was about to run, with autocomplete, transactions, timing, and a per-connection history and saved-query library.
:name params & format-on-saveBEGIN / COMMIT / ROLLBACKEXPLAIN ANALYZE timingSELECT c.name, sum(o.total) AS revenueFROM orders oJOIN customers c ON c.id = o.customer_idGROUP BY c.nameORDER BY revenue DESC LIMIT 5;
The new Operations panel is the tab you open when things are busy or slow:
a live dashboard of active sessions, locks and blocking chains, replication lag and table
sizes, plus a slow-query view over pg_stat_statements, ranked by total or mean
time with an estimated p95. All read-only introspection of Postgres's own stat views.
| query | calls | mean | p95 |
|---|---|---|---|
| SELECT … FROM orders JOIN … | 48.2k | 284ms | 512 ms |
| UPDATE sessions SET … | 120k | 62ms | 110 ms |
| SELECT * FROM users WHERE … | 301k | 9ms | 21 ms |
| INSERT INTO events … | 88k | 4ms | 12 ms |
Hand any query to the EXPLAIN visualizer: a tree of the plan with each node's
cost, planned vs. actual rows, and real timing, heat-mapped so the expensive node lights up
instead of its parents. The index assistant reads your catalogs for unused
and duplicate indexes. Each DROP INDEX it suggests is yours to review; pglens never runs it for
you.
orders_email_idx
0 scans · 142 MB
DROP INDEX orders_email_idx;
Hit Cmd/Ctrl+K to open Spotlight and fuzzy-jump to any table or view in any
schema without scrolling the sidebar.
publicEvery server lives in a single clean grid. Connections come back when you reopen pglens, and your passwords are stored in your OS keychain instead of a config file.
127.0.0.1db.internal:5432/main
SSL verify-full
127.0.0.1:5432/dev
connecting…connected
db.staging:5432/main
SSL require
Point pglens at two connections (staging and prod, say) and it introspects both and writes the forward and backward migration between them. Statements are ordered for dependency safety and destructive ones flagged red. Like every generator in pglens, nothing runs: the migration opens in the editor, behind the Run button.
ALTER TABLE orders ADD COLUMN coupon_id bigint;
CREATE INDEX orders_status_idx ON orders (status);
ALTER TABLE orders ADD CONSTRAINT fk_coupon FOREIGN KEY …;
ALTER TABLE customers DROP COLUMN legacy_ref;
Flip any query result or table page to the Chart view and pglens plots the rows already in hand. It reads your column types (numeric, temporal, categorical) to suggest a line, bar or scatter with sensible axes, and you can override the type or either axis.
Every one of these works by point-and-click, and every one ships in the free, MIT-licensed app.
Point-and-click filters and drag-to-reorder multi-column sorting. Save any combination as a named view.
Edit cells with type-aware controls and add rows through a schema-built form. No bad values, no UPDATE statements.
Click a value to open the row it references, walk relationships with breadcrumbs, and edit along the way.
Count, sum, avg, min, max, stddev and distinct counts pinned to the bottom of every grid, computed on the active filter.
Export tables to CSV, JSON or SQL respecting your filter and columns. Import CSV with column mapping and conflict handling.
Auto-laid-out relationship graph with hover spotlight, live filtering, minimap, and export to SVG or Mermaid ER.
Every no-code action reveals the exact query it runs, and any tab flips to a schema-aware Monaco editor with transactions, timing, history & saved queries.
Live activity over Postgres's stat views (sessions, locks, replication, sizes) plus a
slow-query view on pg_stat_statements. Cancel a backend in a click.
A heat-mapped EXPLAIN plan tree that lights up the costly node, and read-only advice on
unused, duplicate & seq-scan-heavy indexes, with every DROP shown for review.
Diff two connected databases and generate a forward and backward migration: dependency-ordered, destructive changes flagged, opened in the editor to review.
Drag a handle to add a foreign key, add or retype columns, drop them. Edits become reviewable DDL built server-side from structured ops, not SQL typed in the browser.
Sample a jsonb column to infer its key set and types, then click a key to add a
native ->>, @> or ? predicate to the filter
bar.
Browse available extensions with installed vs. default version, then install or drop with
one click. Drops use RESTRICT (never CASCADE) and the DDL is shown for review.
Plot any result or table page as a line, bar or scatter chart from the rows already loaded, with chart type and axes auto-suggested from your columns. No re-query.
Runs on your machine, bound to 127.0.0.1, secrets in the OS keychain. No
account, no telemetry, nothing in the cloud.
No. Filtering, sorting, editing, inserting, aggregating, exporting and importing are all point-and-click. SQL is optional. When you're curious, "Show SQL" reveals exactly what each action runs.
Yes. Flip any tab to Advanced Mode for a schema-aware Monaco editor with
autocomplete, :name parameters, format-on-save, transaction mode
(BEGIN/COMMIT/ROLLBACK), multi-statement results
with EXPLAIN ANALYZE timing, and a per-connection query history plus a
saved-query library with folders and tags. It opens seeded with the query no-code was
about to run, so you start from a working query, not a blank page.
All three have a data grid, so the difference is in how you work with it. pgAdmin's Sort/Filter
dialog takes a SQL WHERE clause; pglens builds filters from a column, an operator
and a value, and lets you click through foreign keys. TablePlus is a paid, closed-source app
whose free trial limits you to two tabs and two advanced filters. DBeaver lists schema compare
in its paid editions; pglens includes schema diff in the free app. See the full comparisons
with pgAdmin, DBeaver and
TablePlus.
Yes. No-code actions never send raw SQL from the browser. The server turns your choices into parameterized queries. Edits are pinned to the primary key, type-validated, applied optimistically, and rolled back if the database rejects them.
Yes. The Operations panel shows live activity (active sessions, locks and
blocking chains, replication, sizes), a slow-query view over
pg_stat_statements, an EXPLAIN plan visualizer that heat-maps
the costly node, and an index assistant for unused and duplicate indexes. It's all
read-only introspection of Postgres's own catalogs. The only SQL it generates is a
DROP INDEX shown for you to review, never run for you.
Yes. Diff & migrate compares two connected databases and produces a forward and backward migration; the visual ERD editor lets you add foreign keys, add or retype columns and drop them. Both turn your changes into dependency-ordered DDL with destructive statements flagged. Like the index assistant, pglens never runs it. The SQL opens in the editor, behind the Run button, built server-side from structured operations rather than SQL typed in the browser.
Yes. pglens is open source under the MIT license, and every feature on this page is in the free app. It works without an account and sends no telemetry.
No. pglens is local-first. It binds to 127.0.0.1 only, routes are
token-gated, and passwords are stored in your OS keychain. Nothing leaves your
machine.
macOS, Linux and Windows, with any modern PostgreSQL server. One install command sets up Node.js and every dependency. Connect by parameters or URL, pick any schema, choose your SSL mode.