SQLite sidekickA read-only SQLite 3 database viewer for Visual Studio Code. Open a No native dependency, and nothing bundled. The engine is Remote files work too. Databases reached over Remote - SSH, WSL, Dev Containers, or Codespaces open the same way, as do those in a virtual workspace such as GitHub Remote Repositories — see Remote and virtual workspaces, which covers where the extension is best installed and the one case where a database can be missing its most recent rows. RequirementsVS Code built on Node 24 or newer, which is where Features
The database, its Read-only, and howViewing must never change a database, so the guarantee is enforced four times over rather than once:
Row countsSQLite has no stored row count — Deep scrolling in a very large table slows down linearly, because SQLite still
visits the rows an Grid controlsClick a column header to select and sort it. Repeated clicks cycle through
ascending, descending, and the original order; an arrow beside the name shows
the active direction. Tables are sorted inside SQLite before pages are loaded,
with Drag the right edge of a column header to resize that column. Double-click the edge to auto-fit just that column to its cached values, or click the Auto-fit all columns button to fit every column to the values currently loaded. Auto-fit is deliberately cache-based, so it does not scan a large table merely to measure text. Click and drag cells to select a rectangle. Shift+click extends from the active cell. Shift+click a row or column header for a contiguous range, or Ctrl/Cmd+ click to toggle individual headers. The top-left corner or Ctrl/Cmd+A selects the displayed grid; Escape or an empty-grid click clears the selection. With the grid focused, arrows, Home, End, Page Up, Page Down, Tab, and Enter move the active cell. Shift extends a cell or whole-row/column selection, and Ctrl/Cmd jumps to an edge. Ctrl/Cmd+Space selects the active column, Shift+Space the active row, and both modifiers select all cells. Tail 10 shows the final ten rows in the active sort; Show all restores the grid. Ctrl/Cmd+C copies the selected rectangle or rows/columns as escaped TSV. Whole-column table copies include headers and every row, not only cached pages; query-result copies use all displayed rows. Ctrl/Cmd+Shift+C adds headers to a row selection. Nulls remain empty and exact raw values are used. With column headers selected, Selected in the export group streams those columns as CSV, TSV, PSV, or a typed JSON array in the active sort order. Delimited files include a header and UTF-8 BOM. Query-result exports rerun the successful query so they are not capped by the display limit. Focus cell highlights the active cell's row and column, including the matching row and column headers and any frozen copies. Column colors are temporarily turned off and their button disabled while focus cell mode is active; leaving the mode restores the previous color setting. The comma icon toggles thousands separators for numeric cells. This and the column palette are display controls only: tooltips, copy, SQL, and CSV continue to use exact raw values. Filter rowsClick the funnel, press Ctrl/Cmd+Shift+F, or run PK SQLite: Filter Rows to open the filter bar. A condition is a column — or Any column, which any field of the row may satisfy — an operator, and a value:
+ Condition stacks another one; a row must satisfy every condition in the
stack. Apply or Enter runs it, Clear empties it, and the funnel carries
the number of active conditions. The filter becomes a A SQL query result is filtered by its own SQL: add a Turning a filter into SQLSQL in the filter bar — or PK SQLite: Write Row Filter as SQL — writes the filter into the SQL editor as the query it stands for, and opens the editor on it:
It is the same conditions the grid is reading, one per line, plus the active
sort, so running it returns the table on screen. From there it is an ordinary
query: join to another table, group it, project fewer columns, keep it in the
session history, or export it to a notebook. The bar can only express a While the bar is open it writes what the rows currently say, applied or not; with the bar closed it writes the filter the grid is showing. The editor's previous contents are replaced, as they are when a history entry is clicked. Freeze panesSelect a cell and click Freeze panes. Everything above and to the left of it stays put while the rest of the grid scrolls, exactly as in Excel — so selecting the cell in row 3, column C pins the first two rows and the first two columns. The button then reads Unfreeze; clicking it again removes the split. It is also available from the command palette as PK SQLite: Freeze or Unfreeze Panes at Active Cell, which makes it a single keybinding if you want one. To move a split, unfreeze first and then freeze at the new cell. Selecting the very first cell freezes nothing, since there is nothing above or to its left, and a split always leaves at least one row and one column free, so the grid can never be pinned solid. Each table remembers its own split, so switching tabs and coming back keeps it. One difference from Excel: columns you scroll past slide underneath the frozen ones rather than stopping beside them. Freezing the leftmost columns to keep an identifier in view works as expected; freezing many columns and then scrolling far right will hide some behind the frozen block. Number display
Trailing digits like those in Integers are never converted to JavaScript numbers or rounded, at any size.
A value beyond 2^53 keeps every digit in the grid, tooltip, copy, and CSV. When
the comma toggle is on, separators are inserted directly into the display text,
so Formatting is display only. Ctrl/Cmd+C copies the exact stored value, hovering a cell shows it, and CSV export is unaffected. Types, and values that disagree with themSQLite is dynamically typed: a declared column type is an affinity, and any row may store any type. Two consequences are visible in the grid. A column with no declared type, and every computed expression, reports no type
at all. The viewer infers one from the first values it loads and marks it with a
trailing A column whose values disagree with its declared affinity is legal and is not
flagged. Text in a BLOB columnsA Blobs of 1 KB or less travel to the viewer whole, so hovering shows a complete
CSV export always writes every byte, whatever the size, because it re-reads the value rather than using the copy the grid holds. Remote and virtual workspacesThe viewer supports databases opened through VS Code Remote - SSH, WSL, Dev Containers, Codespaces, and desktop virtual workspaces such as GitHub Remote Repositories. Install the extension in the location offered by VS Code, then open the database normally or use Open With. What decides the behavior is whether the extension is running on the same machine as the database:
Either way the viewer works. Read-only repositories still support viewing, SQL, profiles, and CSV export to a separate writable location. VS Code offers the install location when you open the database; taking the remote one avoids the copy, and with it the caveat below. A snapshot copies the database and its sidecars, but a write-ahead log is not
always readable that way. So a snapshotted database is the one case that can
show stale rows: if it has an un-checkpointed Notebook export is the one feature that needs a directly-opened file rather than a snapshot, because the exported notebook has to reopen the database by path, outside VS Code. It is therefore available on a remote host when the extension is installed there, and unavailable in a virtual workspace. ExplorerClick Explorer in the viewer toolbar to show or hide the tree of the database, its tables, views, and columns. Selecting a table or view opens it in the grid and highlights its bottom tab, so the tree and the tabs stay in step. The tree is read from SQLite's schema, so expanding a table never scans it,
however large it is. Tables and views are grouped separately; relations whose
names begin with Click Data profile in the viewer toolbar — or run PK SQLite: Toggle Data
Profile — to open the profile pane beside the grid. Drag its left edge to
resize it, and close it from the × in its header. Profiles are calculated
lazily and cached until the database changes. The Query Result tab is also
profileable: its successful The pane has three tabs, all following the active cell:
Every card shows the column's missing, unique, minimum, and maximum values; numeric columns add the mean, the median, and a twelve-bin histogram, while other columns show their eight most frequent values as bars, each with its share of the values present. PNG saves the complete theme-aware card grid, including off-screen cards; it is offered on the All columns tab only. SQLite has no approximate-distinct function, so unique counts are exact — and exact means a full scan with a sort or hash per column. They are computed every time regardless, so on a very large table expect the profile to take a while. SQL and notebook exportClick SQL in the viewer toolbar, enter one read-only query, and select Run or press Ctrl/Cmd+Enter. The editor shows line numbers, and the panel is resized by dragging its bottom edge. Because SQLite offers no way to interrupt a running statement, Cancel and
the Suggestions appear as you type and can be requested with Ctrl+Space. What is
offered first depends on the clause: relations after PrettifyPrettify in the SQL panel, Shift+Alt+F in the editor, right-click in the editor, or PK SQLite: Prettify SQL reformats the query in place:
Each clause starts a line. The first item stays on the clause's line and later
items — separated by a comma, or by Keywords and type names are uppercased. Identifiers, quoted identifiers, string literals, function names, and comments keep the spelling you gave them, and the caret stays with the token it was on. Right-clicking the SQL editor opens a menu with Prettify SQL and Run SQL alongside Cut, Copy, Paste, and Select All. Each entry shows its keyboard shortcut, which remains available if your platform refuses clipboard access to the viewer. The History panel records each command, status, duration, and displayed row
count until the document closes. Notebook creates a JupySQL notebook that
reopens the database read-only through a SQLite URI. Python's Commands
Not supportedEditing anything; charting; encrypted databases (SQLCipher, SEE); opening a database over HTTP or an object store; and FTS5 or R*Tree shadow tables presented as first-class relations. Parquet, CSV, and Excel are a different product — see DuckDB sidekick. ContributingBuilding the extension from source, running tests, and packaging a release are covered in DEV.md. LicenseMIT |