Home › Developer Tools › SQLite Viewer

SQLite Viewer

Open a SQLite database file to see its tables with row counts, browse the data page by page, read the schema and run your own SQL queries. Results export to CSV, and the file never leaves your device.

Last updated:

Advertisement

How to use the SQLite Viewer

  1. Open your database: drop the .db or .sqlite file onto the box or click it to choose a file. No file handy? Press “View sample database”.
  2. Check the file header card for the page size, encoding and the SQLite version that last wrote the file.
  3. Pick a table on the left to browse its rows. Use the arrows to page through and change how many rows you see per page.
  4. Open Schema to see the columns, types and CREATE statements, or Run SQL to type a query and press Run Query.
  5. Export a query result or a whole table as CSV, or download the database after making changes with SQL.

The SQLite file header explained

Every SQLite 3 database starts with a 100-byte header. The viewer reads it directly from the file before loading the SQLite engine, so you can identify a file even offline. All multi-byte values are big-endian.

OffsetSizeFieldTypical value
016Magic string SQLite format 3\0Always the same
162Page size in bytes (1 means 65,536)4096
18 / 191 + 1Write / read format version: 1 = rollback journal, 2 = WAL1 or 2
284Database size in pagesfile size ÷ page size
364Number of free-list (unused) pages0 after VACUUM
444Schema format number4
564Text encoding: 1 UTF-8, 2 UTF-16le, 3 UTF-16be1
604User version (PRAGMA user_version), often an app's schema version0
684Application ID (PRAGMA application_id)0, or e.g. GeoPackage
964Version of SQLite that last wrote the file3045001 = 3.45.1

Handy SQLite queries

TaskQuery
List tablesSELECT name FROM sqlite_master WHERE type = 'table';
Columns of a tablePRAGMA table_info(books);
First 100 rowsSELECT * FROM books LIMIT 100;
Count rows per valueSELECT year, COUNT(*) FROM books GROUP BY year ORDER BY 2 DESC;
Join two tablesSELECT b.title, a.name FROM books b JOIN authors a ON a.id = b.author_id;
Find duplicatesSELECT email, COUNT(*) FROM users GROUP BY email HAVING COUNT(*) > 1;
Database size checkPRAGMA page_count; PRAGMA page_size;
Integrity checkPRAGMA integrity_check;

Where you will find SQLite files

SQLite is the most widely deployed database in the world. You will come across it in browser profiles (history, cookies and bookmarks), Android and iOS app data, desktop apps such as Lightroom catalogues, messaging and note-taking apps, GIS formats like GeoPackage (.gpkg) and MBTiles map tiles, and countless embedded devices. Many of these use extensions other than .db, but they all start with the same “SQLite format 3” header that this viewer checks.

Frequently asked questions

How do I open a .db file?

Most .db files from apps are SQLite databases. Drop the file onto this page and its tables appear in a few seconds. If the tool says the header is missing, the file is a different format; the message tells you what it looks like instead.

Is my database uploaded to a server?

No. The file is read into your browser's memory and opened with sql.js, a WebAssembly build of SQLite. Only the sql.js library itself is downloaded from a CDN; your data never leaves your device.

Can I edit the database?

Yes. Run INSERT, UPDATE, DELETE or CREATE statements in the Run SQL tab. Changes are made to an in-memory copy; press Download database to save the edited file. Your original file is never modified.

Why do I see a -wal or -journal error?

SQLite keeps temporary companion files next to a database, such as app.db-wal or app.db-journal. They are not databases by themselves. Open the main file (app.db). If the app is still running, close it first so recent changes are written into the main file.

How large a SQLite file can I open?

Files of a few hundred megabytes usually work on a desktop computer; the limit depends on your device's memory because the whole file is loaded into the browser. Files over 1 GB are refused to keep the tab responsive.

Can it open encrypted databases?

No. Databases encrypted with SQLCipher or the SQLite Encryption Extension, such as some messenger backups, cannot be read without the key. They usually fail with a “file is not a database” error.

What does the “Written by SQLite” version mean?

Bytes 96–99 of every SQLite file store the version number of the SQLite library that last modified it, for example 3045001 for version 3.45.1. It helps when debugging compatibility between apps.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

CSV ViewerOpen a CSV or TSV file as a sortable, filterable table.Excel Viewer (XLSX / XLS)Open XLSX, XLS and ODS spreadsheets in your browser without Excel.SQL Formatter & BeautifierFormat, beautify or minify SQL queries for MySQL, PostgreSQL and more.CSV to JSONConvert CSV data to JSON with live preview.SQL Dialect ConverterTranslate SQL between MySQL, PostgreSQL, SQLite, SQL Server, Oracle, BigQuery and more.SQL to JSON ConverterConvert SQL INSERT statements and dumps into a JSON array of row objects, with CSV export.Online Python CompilerRun Python 3 in your browser with input(), numpy, pandas, charts and share links.JSON EditorEdit JSON in a tree and as code side by side: add, rename, drag, change types, undo and download.Unzip FilesOpen and extract ZIP files online.RAR & 7z ExtractorOpen RAR, 7z and other archives online and extract files.Regex TesterTest and debug regular expressions live.File Info ViewerCheck file size, type, date and MD5/SHA hashes.DOCX ViewerOpen and read Word .docx files in your browser, then print or save them as HTML.EPUB ReaderOpen and read EPUB e-books in your browser with pages, a table of contents and font controls.What Is My BrowserSee your browser, version, OS, engine, screen and which web features it supports.Font ViewerPreview TTF, OTF, WOFF and WOFF2 fonts with sample text, waterfall, glyphs and metadata.Markdown EditorWrite Markdown with a toolbar, live split preview, autosave and .md or HTML export.Regex Cheat Sheet75+ ready-to-use regex patterns for emails, URLs, IPs and dates, each with a live test box.JavaScript Keycode FinderPress any key to see its JavaScript key, code, keyCode, which, location and modifiers.QR Code ScannerScan QR codes with your camera or from an image and safely read the link or text.RAID CalculatorUsable capacity, efficiency and fault tolerance for RAID 0, 1, 5, 6, 10, 50 and 60 arrays.JSONPath TesterTest JSONPath expressions live: filters, slices, wildcards and recursive search, with matches highlighted.Mermaid Diagram EditorWrite Mermaid code and see flowcharts, sequence, Gantt and ER diagrams live. Export SVG or PNG.Country Codes ListSearch ISO 3166 alpha-2, alpha-3 and numeric country codes with calling codes and TLDs.CSS Selector TesterTest CSS selectors on your HTML: highlighted matches, match count and specificity.Git Cheat SheetSearchable Git command reference by task, with copy buttons and an undo/rename/fix wizard.HAR File ViewerOpen a .har file to see a waterfall timeline, headers, bodies, timings and size totals.jq PlaygroundRun jq filters on JSON in your browser with live output, flags and an example library.Markdown Cheat SheetInteractive Markdown syntax reference: edit every example and see the live rendered preview.Regex ExplainerPaste a regular expression and get a plain-English breakdown, railroad diagram and flag notes.XPath TesterTest XPath expressions on XML or HTML: highlighted matches, node paths, values and examples.EML File ViewerOpen .eml email files to read the message, headers and raw source and save attachments.Graphviz Online ViewerWrite Graphviz DOT code and render graphs live; switch layout engines, export SVG or PNG.JavaScript Online CompilerWrite and run JavaScript in your browser with a console, timing, error lines and share links.Jupyter Notebook ViewerOpen .ipynb files and read code, Markdown, math, tables, plots and errors without Python.LaTeX Table GeneratorEdit a table like a spreadsheet or paste from Excel and get LaTeX tabular or booktabs code.Log File ViewerOpen huge log files with level colors, regex and time filters, JSON pretty-print and tail -f.Logic Gate SimulatorBuild logic circuits with AND, OR, NOT, XOR gates and flip-flops; see live outputs and truth tables.Online Hex EditorOpen any file as hex and ASCII, edit bytes, search, inspect values and save the result.PHP Online CompilerRun PHP 8 code in your browser with output, HTML preview, error lines and share links.PlantUML EditorWrite PlantUML and see sequence, class, activity and more diagrams live. Export SVG or PNG.Sorting Algorithm VisualizerWatch bubble, insertion, merge, quick, heap and radix sort step by step with live counters.Lottie ViewerOpen Lottie JSON or .lottie files to play, pause, scrub frames, change speed and see details.Diff ViewerPaste a git diff or .patch file and view it side by side or inline, with file navigation.EditorConfig GeneratorBuild an .editorconfig with indent, charset, line endings and trim rules per file pattern.Folder Compare ToolCompare two folders by file list, size and SHA-256 hash, then open a text diff of changed files.Glob Pattern TesterTest glob patterns like **/*.js, {a,b} and !exclusions against a list of file paths.JMESPath TesterEvaluate JMESPath expressions against JSON live, the query language used by the AWS CLI.MongoDB Query TesterTest MongoDB find filters, projections and aggregation pipelines on sample JSON documents.Semantic Version CalculatorBump, compare, sort and test SemVer versions against npm ^, ~ and x ranges.XSLT TesterRun an XSLT 1.0 stylesheet on XML in your browser and see the output as HTML, XML or text.ASCII Diagram EditorDraw boxes, arrows and text on a character grid and copy plain-text diagrams for code and READMEs.DBF File ViewerOpen dBase .dbf files and shapefile tables, search and sort records, export CSV or XLSX.MBOX File ViewerOpen .mbox mail archives: list and search messages, read them, save attachments, export EML.MDB File ViewerOpen Access .mdb and .accdb databases in your browser: list tables, view rows, export CSV.Shapefile ViewerView zipped shapefiles on a map with the attribute table, then export to GeoJSON or CSV.MSG File ViewerOpen Outlook .msg emails in your browser: sender, recipients, body, headers and attachments.Online Code EditorVS Code-style editor in your browser: tabs, 50+ languages, find/replace, autosave.
See all 53 Code Playgrounds & Testers →